I have my current code working perfectly but I needed help on when I want the code to display as many queries exist in the table called wine... for example if there are more than wine type in category as spain then it should display all but it only displays one.
Here is my PHP:
<?php
include"db_connection.php";
$sql = mysql_query("SELECT * FROM WINE WHERE country='Chile'");
while($row = mysql_fetch_array($sql)){
$description = $row["description"];
$wine_type = $row["wine_type"];
$country = $row["country"];
$bottle_price = $row["bottle_price"];
$indicator = $row["indicator"];
$colour = $row["colour"];
$case_price = $row["case_price"];
$case_size = $row["case_size"];
$date_added = strftime("%b %d, %Y", strtotime($row["date_added"]));
}
?>
Here is my HTML:
<?php include('header.php'); ?>
<div id="content">
<table width="100%" border="0" cellspacing="0" cellpadding="15">
<tr>
<td width="19%" valign="top"><img src="inventory_images/<?php echo $id; ?>.jpg" width="142" height="188" alt="<?php echo $wine_type; ?>" /><br />
<a href="inventory_images/<?php echo $id; ?>.jpg">View Full Size Image</a></td>
<td width="81%" valign="top"><h3><?php echo $wine_type; ?></h3>
<p><?php echo "$".$bottle_price; ?><br /><br />
<?php echo "$country $indicator"; ?> <br /><br />
<?php echo $description; ?> <br />
</p>
<form id="form1" name="form1" method="post" action="cart.php">
<input type="hidden" name="pid" id="pid" value="<?php echo $id; ?>" />
<input type="submit" name="button" id="button" value="Add to Shopping Cart" />
</form>
</td>
</tr>
</table>
</div>
<?php include('footer.php'); ?>