function deleteItemFromBasket id global basket unset basket id saveBas

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
function deleteItemFromBasket($id){
global $basket;
unset($basket[$id]);
saveBasket();
}
if(isset($_GET['id'])){
$id = $_GET['id'];
deleteItemFromBasket($id);
header("Location: basket.php");
}