note 54731 added to function.session-unset
| From: | zach at zkwarta dot com | Date: | Wed, 13 Jul 2005 22:32:03 +0000 |
| Subject: | note 54731 added to function.session-unset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-91924@lists.php.net to get a copy of this message | ||
The difference between both session_unset and session_destroy is as follows:
session_unset just clears out the sesison for usage. The session is still on the users computer.
Note that by using session_unset, the variable still exists.
Using session_unset in tandem with session_destroy however, is a much more effective means of
actually clearing out data. As stated in the example above, this works very well, cross browser:
session_unset();
session_destroy();
I noticed that in firefox, one could simply use sesison_unset and the session would be cleared. When
trying this on IE, I was horrified to find out that the data was still there, so I had to use
session destroy.
----
Manual Page -- http://www.php.net/manual/en/function.session-unset.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54731
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54731&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54731&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54731&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54731&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54731&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54731&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54731&report=yes
Search -- http://master.php.net/manage/user-notes.php