hi
i have a simple script that adds an item id to a session...
<?php
session_start();
$itemid = $_POST["itemid"];
if (count($SESSION["cart"]) < 1) {
$SESSION["cartitems"] = array();
}
$_SESSION["cart"][] = $itemid;
header("location:cart.php");
?>
i need something that will delete an id out of the array so the cart wont display this.
this is what i tried but nothing was change but no errors occured,
<?php
session_start();
$id=$_POST["id"];
unset($_SESSION['cart']['$id']);
header("location:cart.php");
?>
i would be gratefull of any help,
many thanks