Page 1 of 1
Session in PHP
Posted: Fri Jan 29, 2010 2:22 am
by nithinkk
I have a login system which has lots of session variables.....if a user signout the session variables will destroy.What if the user close the browser without signout. Will the session variable still there in server ??? how long it will be there ??? how to set the session expiry time when declaring the session variable ???
My session variable is like this :
session_register("mysessionvariable");
$id = session_id();
$_SESSION['login']="True";
$_SESSION['loginuser']=$authenticUser;
can anyone put some light on it ???
Re: Session in PHP
Posted: Fri Jan 29, 2010 3:49 am
by iamngk
If you close the browser, session will be destroyed automatically i.e. session will not available for no more.
Re: Session in PHP
Posted: Fri Jan 29, 2010 4:22 am
by nithinkk
No session will not destroy automatically if the browser closes bcoz its stored in server....
Re: Session in PHP
Posted: Fri Jan 29, 2010 4:34 am
by Sonia ferdous
session must be destroy....
Re: Session in PHP
Posted: Fri Jan 29, 2010 6:48 am
by nithinkk
im sure that it will not get destroy.....
Re: Session in PHP
Posted: Fri Jan 29, 2010 12:22 pm
by klevis miho
When you close the browser the session variable will be destroyed. If you don't want that, use cookies.
Re: Session in PHP
Posted: Mon Feb 01, 2010 3:56 am
by nithinkk
when a browser closes without sign out and some one else access the same page we can able to get in without signout....
Re: Session in PHP
Posted: Mon Feb 01, 2010 9:16 pm
by nithinkk
ohhh...god no one can clear my doubt .....????
Re: Session in PHP
Posted: Mon Feb 01, 2010 9:41 pm
by Christopher
Please do not double post. Sometimes you will not get an answer.
See the manual about PHP's configuration setting for the session:
http://www.php.net/manual/en/session.co ... ni.session