Jump to content
MakeWebGames

Can someone point me what i am doing wrong here?


Lithium

Recommended Posts

session_start();

$x = session_id();

if (!empty($_SESSION))

{

session_regenerate_id(TRUE);

$y = session_id();

session_id($x);

session_destroy();

$x = $_SESSION;

session_id($y);

session_start();

$_SESSION = $x;

}

this works, as it creates a new session, though, when hitting back browser button it would make a call to a session_id that no longer exists, yet it remains as it was there... so definetly, i am doing something bad, though i don't know where!

Link to comment
Share on other sites

Re: Can someone point me what i am doing wrong here?

regenerate session id on every page load, and destroy the previously one used. it does it, though let's say i go back on the browser by a page or two... wasn't it suppose to deny me, as i am calling a sid that no longer exists?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...