0

Is it possible to set the same sesion_id everytime before session_start even after the session has expired? I want to have the same session id for a user each time he logins for some testing purpose. This is how i do it.

session_id($myid);
session_start();

if(isset($_SESSION['something']))
{
      // do something
}
else
{
      // set the same variables again depending on some condition

}
  • You can store the previous `session_id` in database – IROEGBU Dec 11 '13 at 09:29
  • i am storing the session_id locally. I want to use the same session_id forever for the user. – user2753583 Dec 11 '13 at 10:35
  • you might want to look at http://stackoverflow.com/questions/15587994/when-browser-is-closed-does-saved-data-in-session-lost/15588052#15588052 – IROEGBU Dec 11 '13 at 12:20
  • i know about cookies, but i am testing something on a mobile sdk which does not support cookies. I have set up something like a cookie locally on the device. just want to keep the same session id everytime the session expires until the user logouts. – user2753583 Dec 11 '13 at 13:53

0 Answers0