Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(isset($_GET['plus'])){
- $_SESSION['product_'.$_GET['plus']]+=1;
- if($_SESSION['product_'.$_GET['plus']] < 1){
- header('Location: checkout.php');
- }else{
- header('Location: checkout.php');
- }
- }
- if(isset($_GET['remove'])){
- $_SESSION['product_'.$_GET['remove']]--;
- if($_SESSION['product_'.$_GET['remove']] < 1){
- header('Location: checkout.php');
- }else{
- header('Location: checkout.php');
- }
- }
- if(isset($_GET['delete'])){
- $_SESSION['product_'.$_GET['delete']] = '0';
- header('Location: checkout.php');
- }
- $btn_add='<a class="btn btn-success" href="cart.php?plus='.$id.'"><i class="fa fa-plus fa-lg" aria-hidden="true" add_btn></i></a>';
- $btn_remove = '<a class="btn btn-warning" href="cart.php?remove='.$id.'"><i class="fa fa-minus fa-lg" aria-hidden="true" remove_btn></i></a>';
- $btn_delete='<a class="btn btn-default delete_btn" href="cart.php?delete='.$id.'"><i class="fa fa-times fa-lg" aria-hidden="true"></i></a>';
Advertisement
Add Comment
Please, Sign In to add comment