???? ?? ? ??? ??
1. ?? ?? ??? ??? ????.
a ?? ?? ??:
<a href="shoppingcart.php?a=delone&key=<?php echo $key ?> " onclick=" "> ?? ??
?? ??? ?? ??:
<a href="shoppingcart.php?a=empty">???? ???</a>
???? ?? ? ?????:
<?php //取消購(gòu)物車(chē)?yán)锏囊患唐?elseif($a=="delone"){ $key=$_GET["key"]; $shoppingcart=unserialize($_COOKIE["shoppingcart"]); unset($shoppingcart[$key]); if(empty($_COOKIE)){ setcookie($shoppingcart,"",time()-3600); }else{ setcookie("shoppingcart",serialize($shoppingcart)); } header("location:shoppingcart.php"); exit(); }
3, ??? ??? ????