Reputation: 4944
I am using a PHP / MySQL login system. With a new browser session, I tend to get logged out as I navigate the site.
Any tips on how I can go about fixing this?
Thanks in advance,
John W.
Upvotes: 0
Views: 72
Reputation: 2321
Sounds like the system is using sessions for persistent user logins which yes expire once the browser is closed. The solution is to use cookies for keeping track of users. You can extend the lifetime of a cookie for as long as you want and they are persistent through browser sessions.
Upvotes: 1
Reputation: 6585
Check expiration time on the cookies that PHP sends to browser. Set expiration time to 0 so that they are this-session-only (until user closes browser)
Upvotes: 0