View Full Version : Problem with Sessions

03-18-2009, 10:01 AM

I done the login page. In that i store the username and passwords in sessions.It works fine.But i want to change my login page code as
"When we close the browser the login page will automatically logout especially for Mozilla."

How can i resolve that problem.I am facing this problem from long days.Its urgent.Anybody please help to that problem.

03-18-2009, 10:17 AM
You could use cookies to save the login info, take a look at http://www.evolt.org/php_login_script_with_remember_me_feature

03-18-2009, 10:29 AM
Sessions usually only last till the browser is closed unless you are using cookies. Also why on earth would you be storing their password in a session? There is no need for this and its very insecure.

03-18-2009, 01:08 PM
unless you restore the old session or else the session should end..
If you are looking for persistent login(which most of the forum do...)... you can read up this implementation: