note 8484 deleted from setcookie by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Thu, 14 Sep 2000 10:09:16 +0000 |
| Subject: | note 8484 deleted from setcookie by jmcastagnetto | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-4967@lists.php.net to get a copy of this message | ||
I was having problems unsetting a cookie, I need to do this so
that a user could "logout" of a php program
I read all the notes in this section to no avail
What did work was
if I set the original cookie up like
setcookie("MYCOOKIE",$value,time() + 3600,"/");
I could reliably unset it with :
setcookie("MYCOOKIE","",time() -10 ,"/");
I.E set the time as a relative negative ( I got this from a Javascript manual)
Hope this helps other head bangers
( have to say that the php4 documentation is not good )