Page 1 of 1

session handler

Posted: Sat Jun 05, 2004 1:16 am
by pixelwraith
im posting this again because i thought it might get lost at the bottom of my old post - hope its ok :)


ive tried the code in tek-tips
http://www.tek-tips.com/gfaqs.cfm/pid/434/fid/2037
for session handling
it allows me to log in but doesnt delete the session variables so i can never log out

my logout code definately works as ive used it with another session handler and file based sessions but here it is anyway
<?
$go = "../adminlogin.php";
header("Location: $go");
include("../../include/session_mysql.php");
session_start();
unset($_SESSION['details']);
unset($_SESSION['valid_user']);
unset($_SESSION['timeout']);
session_destroy();
?>

has anyone been able to use this code (tek-tips) successfully?

Posted: Sat Jun 05, 2004 2:49 am
by mudkicker
use session_unset() ??

Posted: Sat Jun 05, 2004 4:30 am
by pixelwraith
here it says
Note: If $_SESSION (or $HTTP_SESSION_VARS for PHP 4.0.6 or less) is used, use unset() to unregister a session variable, i.e. unset ($_SESSION['varname']);.

as i have used $_session
i tried it anyway just in case and it didnt work
i dont think its the logout code