Hi Vicki: I'm not going to cover everything in the email. BUT, the essence of the solution is right here. I made a little test script based on the values you said were in the cart array at the top of the page and the variables contained in the form...
#! /usr/local/bin/php -q <?php # Simulate the $cart session variable: $cart[1] = 1; $cart[3] = 1; # Simulate the $checkbox array from the form: # $checkbox[1] = 'yes'; $checkbox[3] = 'yes'; # Run through each item in the cart: foreach($cart as $artID => $value) { if ( !isset($checkbox[$artID]) ) { unset($cart[$artID]); echo "<br />removed $artID from cart\n"; } else { echo "<br />kept $artID in cart\n"; } } ?> This behaves exactly as expected. Now, let's put my foreach loop from above (leave out all the rest of the stuff) in the place of your foreach loop (which is in the if($save) statement). Run it and things _should_ work right. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php