开发者

Getting Logged Out During Navigation

I am us开发者_StackOverflowing 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.


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.


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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜