Jump to content

Destroy a session


Anders Moen

Recommended Posts

How do I destroy a session? When i go to my login page, I log in, and then it takes me to the index and from there I click log out and I get to the log out page. And from there I get redirected back to the index where I go to the login page again, and I'm still loged on :)

Link to comment
Share on other sites

Hello You're question not clear to get what you wanna do , but i hope u wanna this

<?phpob_start();session_start();if($_SESSION['sessref']){//echo "my name is : dolib";		$_SESSION = array();		session_unset();		session_destroy();	  header("location:admincp.php");		exit();}ob_end_flush();?>

and if you know Arabic tell me

Link to comment
Share on other sites

Thanks guys, but I found out right after I posted this post. And I didn't have time to tell that I found out.I just used<?phpsession_start();session_destroy();?>at the logout page. Hehe, thanks anyway :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...