Cerby
10-28-2007, 06:33 PM
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?
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);
?>
How do I display each record/product along with a button to add the product to the shopping cart/session?
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);
?>