<?php include 'includes/header.php';?>
 
<?php
if ($_POST['tip']) {
 $tip = $_POST['tip'];
 switch ($tip) {
   case 'ekle':
       /* if (is_array($_SESSION['sepet'][$_POST['urunid']])) {
        $_SESSION['sepet'][$_POST['urunid']]['qty']['menu_porsiyon']+= $_POST['qty']['urunid']['menu_porsiyon'];
      } else {*/



       $_SESSION['sepet'][] = $_POST;
       $_SESSION['okeysepet']=1;
           // 
        //}

       header("location:".htmlspecialchars($_SERVER['HTTP_REFERER']));
       break;

       case 'sil':
       $id = $_POST['id'];
       unset($_SESSION['sepet'][$id]);
       header("location:".htmlspecialchars($_SERVER['HTTP_REFERER']));
       
       break;
     }

     

    // header("location: sepetim");
   }



   ?>

