note 17915 added to function.session-id
| From: | poknam at hotmail dot com | Date: | Wed, 02 Jan 2002 20:39:01 +0000 |
| Subject: | note 17915 added to function.session-id | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-24310@lists.php.net to get a copy of this message | ||
//login.php
session_id(md5(uniqid(rand(),1)));
session_start();
header("Location: index.php");
//logout.php
session_start();
session_unset();
session_destroy();
//session_id destroyed after my checking
header("Location: index.php");
//index.php
if (session_id()) :
echo "hello";
else :
echo "bye";
i found that the session_id() works fine in the login.php and logout.php
however, after logout and forward to index.php, the session_id remains here and "hello" is
appeared
Can i destroy the session_id??
i found that there is the problem is solved when i use other variables and use session_register()
instead
e.g. session_register("login");
Is that means session_id is useless??
--
http://www.php.net/manual/en/function.session-id.php
http://master.php.net/manage/user-notes.php?action=edit+17915
http://master.php.net/manage/user-notes.php?action=delete+17915
http://master.php.net/manage/user-notes.php?action=reject+17915