note 53744 added to function.setcookie
| From: | nahtan at email dot com | Date: | Sat, 11 Jun 2005 11:35:17 +0000 |
| Subject: | note 53744 added to function.setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-90261@lists.php.net to get a copy of this message | ||
I tried for an hour to figure out how to have a session cookie (one that deletes when the browser is
closed) with a path.
If you specify 0 as the expire parameter, the cookie will be a session cookie. eg:
setcookie("test", "value", 0, "/somepath/");
----
Manual Page -- http://www.php.net/manual/en/function.setcookie.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53744
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53744&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53744&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53744&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53744&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53744&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53744&report=yes
Search -- http://master.php.net/manage/user-notes.php