Hi There,
I have php 4.04 (also tried 4.05) on Win2K prof + IIS 5
I'm trying to work with the sessions, but for some reason they won't die - they ciontinue to exist even after user closes the browser 🙁 - the only way to unset session variable is session_unregister() and session_destroy() both ways doesn't work for admin part when admin user closes his browser only if he clicks logout, so anybody can re-open the browser and be already logged-in
i'm looking for any information regarding sessions and how to kill it open browser window closing
here is the code that i'm using:
first file - set.php:
session_start();
$user_level = "mylevel";
$user_name = "myname";
$userid_loggedin= "yes"
session_register("user_name");
session_register ("user_level");
session_register ("userid_loggedin");
close browser window -> open it again -> run this file
show.php:
session_start()
session_register("user_name");
session_register ("user_level");
session_register ("userid_loggedin");
echo $HTTP_SESSION_VARS["user_name"];
echo $HTTP_SESSION_VARS["user_level"];
echo $HTTP_SESSION_VARS["userid_loggedin"];
I also tried this: in set.php :
$session_time = time();
session_set_cookie_params ($session_time);