View Single Post
Old 10-28-2007, 09:26 AM   #1 (permalink)
Love.Oasis
Guest
 
Posts: n/a
Add to Shopping Cart

OK, For testing/development purposes, I have the following code to display all the products contained inside the database.
How do I display each record/product along with a button to add the product to the shopping cart/session?

Code:
mysql_select_db("Data", $con);

$result = mysql_query("SELECT * FROM Products");

while($row = mysql_fetch_array($result))
{
  echo $row['Name'];
  echo $row['Price'];
}

mysql_close($con);
?>
  Reply With Quote