Jump to content

pulling cart from mysql table


lional

Recommended Posts

I am trying to write a script that can pull all the items from a mysql table and add them to the cart.

The reason is that I output the products ordered in a pdf for authorization. This might not happen the same day so I write all the products to the table, so that when the order is approved or changes need to be made we can import those records into the shopping cart and edit the order as need be or checkout

The code for the initial cart is

foreach($_POST['product'] as $key => $value)
{
$qty1 = $value;
$pid = $key;

	// add to the cart session variable
	$_SESSION['cart'][$pid] = $qty1;

}

How do I enter this to pull the products from my mysql table.

Link to comment
https://forums.phpfreaks.com/topic/127206-pulling-cart-from-mysql-table/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.