Check this out:
case 'delete':
if ($cart)
{
$items = explode(',',$cart);
$newcart = array();
foreach ($items as $item)
{
if ($_GET['ship_id'] != $item)
{
$newcart[] = $item;
}
}
$_SESSION['cart'] = implode(',', $newcart);
}
header("Location: info.php?ship_id=" . $_GET['ship_id']) ;
break;
it will fill newcart
array with all items except $_GET['ship_id']
. One more thing, fill session before redirecting.