mohitagarwal7733 Posted June 26, 2021 Share Posted June 26, 2021 Hello guys, I am new to PHP. I need some help. I am trying to build a web app, in which I have login functionality. I want to keep the logged in user session active for around 3-4 months. But in my case as soon as I close the browser, session data is lost and I need to login again. Can anyone help me with this. Quote Link to comment https://forums.phpfreaks.com/topic/312987-php-session-expiry-time/ Share on other sites More sharing options...
requinix Posted June 26, 2021 Share Posted June 26, 2021 Use a "remember me" cookie: the session cookie continues to do what it's doing now, and you set another cookie (which may live up to 4 months) that can be used to log the user back in automatically. Quote Link to comment https://forums.phpfreaks.com/topic/312987-php-session-expiry-time/#findComment-1587597 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.