Hi all
I am working on my first online shop system and would like help with the following:
when a user adds items to the basket, I store the data in a session variable as such which works great:-
$_SESSION['mybasket'][$_POST['productid']] = array('quantity' => $_POST['quantity'], 'productprice' => $_POST['productprice']);
Now, in my Basket View page, I want to allow the user to update the quantities as you would expect of each item if they choose to do so, but this is where I am stuck.
For each product item in my array I echo the product details but also a Quantity Field as such:
<input class=\"quantitytext\" name=\"quantity[]\" type=\"text\" value=\"" . $array['quantity'] . "\" />
How would I now update the quantities of each item in the session array when the page is posted?
Thanks for any suggestions.
An Amateur