note 3842 deleted from function.setcookie by rasmus
| From: | rasmus@php.net | Date: | Sat, 10 Aug 2002 14:25:33 +0000 |
| Subject: | note 3842 deleted from function.setcookie by rasmus | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-34694@lists.php.net to get a copy of this message | ||
I just realized that if you set a cookie, and you want to unset the cookie you will have to follow
the order on the setcookie();
for example:
<pre>
setcookie("MyCookie","MyCookieValue",time()+3600,"/tmp","www.domain.com");
then for unsetting the cookie:
setcookie("MyCookie","","","/tmp","www.domain.com");
</pre>
On the previous note about unsetting cookie, if you have double quotes on the time parameter, you
have to the quotes on the unset cookie.
Thanks
- Rudy