hey all. sorry for posting something that has been asked numerous times b4, but even from goin through the old threads I can't fix my problem😕
anyhow, I am registering sessions on login for my shopping cart, go through do your stuff, go to the cart page and whatever, the session is tracking fine, I have this at the top of each page in an include file:
session_start();
$s_id = session_id();
$cust = $_SESSION['name']; //assign login name
then when I go to logout, it doesn't give me an error, but when I redirect back to the login page and sign-in with another username, it is still using the same session #, this is my logout page:
//session_start();
//session_unset();
//session_destroy();
session_start();
if (isset($SESSION['name']))
{
$cust = $SESSION['name'];
$s_id = session_id();
unset ($s_id);
unset ($cust);
session_destroy();
}
header("Location: http://www.mysite.com/php/login2b.php");
?>
I've tried it both ways the commented and the uncommented.
any ideas on how to terminate the sessions and create a new one without having to close the browser?
thanks in advance!