Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach($_SESSION['cart'] as $key=>$item) {
- if($index == $item['index']) $realqty = $realqty -1; else $realqty = $item['qty'] - 1;
- mysqli_query($conn, "UPDATE items SET qty = '".$realqty."' WHERE product_index = '".$item['index']."';");
- $index = $item['index'];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement