Hi everyone..
I'm using a very simple code to remove an item from session array. I just jave no idea why it returns SQL error like this in another page that initiated the deletion:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
my code to remove is as below:
<?php
session_start();
$id = $_GET['id']; //product marked for deletion on the webpage
unset($_SESSION['items'][$id]);
header('Location:add_cart.php');
?>