Shopping Cart Updating Quantities Question.

From: Date: Tue, 03 Jun 2003 22:51:32 +0000
Subject: Shopping Cart Updating Quantities Question.
Groups: php.db 
Request: Send a blank email to php-db+get-28274@lists.php.net to get a copy of this message
Greetings all, Ok, I've made some progress with my shopping cart. I can now update the quantity of one item only. When I try to update the quantities of 2 products it only lists the first product with its previous quantity. I also need to press the "update quantity" button twice for the quantity to be changed. How can I update quantities of more than one product and why do I have to press the "update quantity" button twice? Here's the product catalogue: http://www.hostmaster-x.co.uk/DisplayProducts.php?TypesOfInterests=11 The values are passed to the URL and the code I'm using to update quantities is as follows: foreach($shoppingcart['products'] as $buy => $quantity) { if ($_GET['buy'] == $buy) { $shoppingcart['products'][$buy] = $_GET['quantity']; } Any ideas ppl? Cheers, Graeme :)

« previous php.db (#28274) next »