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