whhhhaaaazzzzuuuuuppppppp
New member
I have a database and want to display it's content in this manner:
[Prod 1] [Prod 2] [Prod 3] [Prod 4]
[Prod 5] [Prod 6] [Prod 7] [Prod 8]
Just 8 results per page is all I need.
Here is what my code is like at the moment.
<?
include 'database_conn.php'; // make db connection
$sql = "SELECT title, category, description, price, postage FROM rugs";
$queryresult = mysql_query($sql) or die (mysql_error());
while ($row = mysql_fetch_array($queryresult)) {
$title = $row['title'];
$category = $row['category'];
$description = $row['description'];
$price = $row['price'];
$postage = $row['postage'];
echo "<th>Title: $title<br />";
echo "Category: $category<br />";
echo "Description: $description<br />";
echo "Price: $price<br />";
echo "Postage: $postage";
}
mysql_free_result($queryresult);
mysql_close($conn);
?>
[Prod 1] [Prod 2] [Prod 3] [Prod 4]
[Prod 5] [Prod 6] [Prod 7] [Prod 8]
Just 8 results per page is all I need.
Here is what my code is like at the moment.
<?
include 'database_conn.php'; // make db connection
$sql = "SELECT title, category, description, price, postage FROM rugs";
$queryresult = mysql_query($sql) or die (mysql_error());
while ($row = mysql_fetch_array($queryresult)) {
$title = $row['title'];
$category = $row['category'];
$description = $row['description'];
$price = $row['price'];
$postage = $row['postage'];
echo "<th>Title: $title<br />";
echo "Category: $category<br />";
echo "Description: $description<br />";
echo "Price: $price<br />";
echo "Postage: $postage";
}
mysql_free_result($queryresult);
mysql_close($conn);
?>