$val) { list($action, $item) = explode('_', $name); if ($action == 'delete') { unset($_SESSION['cart'][$item]); continue; // don't process anything else for this deleted product } if ($action == 'quantity') { if ($val > 0) { $_SESSION['cart'][$item]['quantity'] = floor($val); } } } // re-index the cart $_SESSION['cart'] = array_values($_SESSION['cart']); } } dbDisConnect($link); ob_flush(); ?>
|
||||||||||||||
|
||||||||||||||