note 45529 added to function.setcookie
| From: | goochivasquez_no_spam at yahoo dot co dot uk | Date: | Thu, 09 Sep 2004 20:37:58 +0000 |
| Subject: | note 45529 added to function.setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-76357@lists.php.net to get a copy of this message | ||
Remember if you set a cookie with a path (eg '/', set cookie available for whole domain)
and you want to delete the cookie again you have to use the same path or a path that includes the
path under which the cookie was set. If you don't do this the cookie won't be deleted.
set cookie:
setcookie ("admin", $aname, time() + (60*60*24*7), '/');
delete again:
setcookie ("admin", "", time() - 3600), '/');
----
Manual Page -- http://www.php.net/manual/en/function.setcookie.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45529
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45529&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45529&report=yes
Search -- http://master.php.net/manage/user-notes.php