Page 2 of 2

Posted: Fri Dec 29, 2006 4:18 pm
by John Cartwright
just in case, what is in admincp? I'm beginning to think there is something bonky there.

Posted: Fri Dec 29, 2006 4:26 pm
by ms_dos10
thanx it work now thanx for everything

Posted: Fri Dec 29, 2006 4:27 pm
by RobertGonzalez
Just in case someone else might run into a session closing logout problem, can you post your solution?

Posted: Fri Dec 29, 2006 4:28 pm
by ms_dos10
admincp.php it's a login page i redirect user to when he log out nothing on it .
thanx for helping me

Posted: Fri Dec 29, 2006 4:33 pm
by ms_dos10
be for am not starting session that why am not found that variable , that means if not correct and am not go in inside if statement .

Code: Select all

<?php
ob_start();
session_start();
if($_SESSION['sessref'])
{

//echo "my name is : dolib";
        $_SESSION = array();
        session_unset();
        session_destroy();
      //  header('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['web/student']) . 'admincp.php');
      header("location:admincp.php");
        exit();
}

ob_end_flush();
?>

Posted: Fri Dec 29, 2006 5:09 pm
by RobertGonzalez
I suppose it is always helpful to actually start the session before trying to kill it, eh? :wink: