|
-
Aug 19th, 2003, 10:58 AM
#1
Thread Starter
Lively Member
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
Last edited by yair24; Sep 8th, 2003 at 01:13 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|