<?php
session_start();
require_once('../connection.php');

//check if id is sent
if (isset($_GET['id'])) {
    $id = $_GET['id'];
    
    //check if basket exist + check if item is present
    if (isset($_SESSION['cart'][$id])) {
        //remove item
        unset($_SESSION['cart'][$id]);
    }
}

header("Location: basket.php");
exit;

?>