note 85743 added to function.session-destroy
| From: | yesmarklapointe at hotmail dot com | Date: | Tue, 16 Sep 2008 05:16:29 +0000 |
| Subject: | note 85743 added to function.session-destroy | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-144434@lists.php.net to get a copy of this message | ||
I ran an experiment. Firefox3 and IE7 both behave the same on my machine. The following statements
clear out the variables immediately:
session_unset()
$_SESSION = array()
unset($_SESSION['whatever'])
But if you are intent upon using session_destroy(), know that it only empties out the variables when
the page is reloaded or redirected to some other page. As long as it's the same page, the
variables are still usable after invoking session_destroy().
----
Server IP: 69.147.83.197
Probable Submitter: 72.223.11.42
----
Manual Page -- http://www.php.net/manual/en/function.session-destroy.php
Edit -- https://master.php.net/note/edit/85743
Del: integrated -- https://master.php.net/note/delete/85743/integrated
Del: useless -- https://master.php.net/note/delete/85743/useless
Del: bad code -- https://master.php.net/note/delete/85743/bad+code
Del: spam -- https://master.php.net/note/delete/85743/spam
Del: non-english -- https://master.php.net/note/delete/85743/non-english
Del: in docs -- https://master.php.net/note/delete/85743/in+docs
Del: other reasons-- https://master.php.net/note/delete/85743
Reject -- https://master.php.net/note/reject/85743
Search -- https://master.php.net/manage/user-notes.php