note 28803 added to function.session-unregister
| From: | stuartc1 at hotmail dot com | Date: | Fri, 24 Jan 2003 12:32:57 +0000 |
| Subject: | note 28803 added to function.session-unregister | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-42688@lists.php.net to get a copy of this message | ||
If you are killing a session, and then checking for its existance later on on the same script, the
session will still exist. you need to reload or redirect before the session becomes unregisted. Here
is what i needed to do:
url call = login.php?kill=y
if(isset($_GET['kill'])) {
$auth= NULL; // empty the variable
session_unregister("auth"); // unregister it
session_destroy(); // kill the session
header("location: login.php"); // reload the page
}
I am using PHP4.1.2
--
http://www.php.net/manual/en/function.session-unregister.php
http://master.php.net/manage/user-notes.php?action=edit+28803
http://master.php.net/manage/user-notes.php?action=delete+28803
http://master.php.net/manage/user-notes.php?action=reject+28803