delete cookies [RESOLVED]
hello,
I have 3 pages that deals with cookies:
addcookies.php
<?
$i=0;
$prod=$_COOKIE['prod'];
while (list ($name, $value) = each ($prod))
$i++;
$prod=$_GET['prod'];
setcookie("prod[$i]",$prod);
?>
delcookies.php
<?
$prod=$_COOKIE['prod'];
while (list ($name, $value) = each ($prod))
setcookie("prod[$name]","");
?>
showcookies.php
<?
$prod=$_COOKIE['prod'];
while (list ($name, $value) = each ($prod))
echo "$name == $value<br>\n";
?>
this cookies are holding array as values
I am keep failing to delete all the array there is always one cell in the array that is left...
anybody see something wrong in this code?
if you cant help me base only on this code then tomorrow I will upload it to my server and you will see what I mean...
Yair