<?php

header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS');
header('Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With');

include('../functions.php');

if(isset($_POST['cart_id'])){

    $cart_id=$_POST['cart_id'];
    $query=$con->query("DELETE FROM `cart` WHERE `cart_id`='$cart_id'");
    if($query){
        echo 1 ;
    }else{
        echo 0;
    }        
}       
?>