note 53589 added to function.session-destroy
| From: | SammyGunnz at osu1 dot php dot net | Date: | Mon, 06 Jun 2005 21:11:11 +0000 |
| Subject: | note 53589 added to function.session-destroy | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-90025@lists.php.net to get a copy of this message | ||
Nick wrote:
-----------
For deleting the session cookie:
setcookie( session_name() ,"",0,"/");
that worked for me. When I ran that function without the last parameter, it didn't work. If
you leave out that parameter( domain ), it will default to the current directory, which isn't
always the same as the session cookie's domain.
nick
-----------
Nick is correct. This is a very simple way of killing the session cookie.
----
Manual Page -- http://www.php.net/manual/en/function.session-destroy.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53589
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53589&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53589&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53589&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53589&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53589&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53589&report=yes
Search -- http://master.php.net/manage/user-notes.php