hi all
I am looking to find a solution to my problem.
A list of product info is built dynamically on my page and each product displayed needs to have a quantity text box and a buy now button. What I need is to understand how if a user types a quantity and presses the Buy Now button, how do I capture only that product/quantity posted and not the others on the page?
I have a structure to store my basket contents in a PHP session as such:
$_SESSION['cart'][$_POST['productid']] = array( 'productid' => $productid,
'quantity' => $_POST['quantitytext'],
'productprice' => $price
);
Can anyone provide some advice on how I achieve this?
Many Thanks