csimmons Posted April 28, 2008 Share Posted April 28, 2008 Hey, I am currently developing a forum-like application using WAMP. As of right now I have a script that asks for username and password, connects to the database, checks for username and password, and then portrays a login success page. I was wondering if anyone could push me the right direction to keep me logged in until I don't need to be anymore. Link to comment https://forums.phpfreaks.com/topic/103284-login-duration/ Share on other sites More sharing options...
kts Posted April 28, 2008 Share Posted April 28, 2008 What method are you using the check? and are you using sessions? or cookies? Link to comment https://forums.phpfreaks.com/topic/103284-login-duration/#findComment-528973 Share on other sites More sharing options...
DyslexicDog Posted April 28, 2008 Share Posted April 28, 2008 Sessions would work for tracking while you are logged in but typically if you close that window then you'll lose your session. I think you should look into cookies, if you would like to stay logged in longer than what a session can provide. You won't be getting rid of sessions but using it combination with cookies. Link to comment https://forums.phpfreaks.com/topic/103284-login-duration/#findComment-528976 Share on other sites More sharing options...
csimmons Posted April 28, 2008 Author Share Posted April 28, 2008 The scale that I am using it on isn't massive to need to worry about cookies. Just a small office application for the person in charge of records to keep track of our hours. BTW I am using sessions. Link to comment https://forums.phpfreaks.com/topic/103284-login-duration/#findComment-528981 Share on other sites More sharing options...
revraz Posted April 28, 2008 Share Posted April 28, 2008 As stated, your session will remain until you close your browser or the session time out limit has hit (in your php.ini). If you want it to remember your log in after you close the browser, you need to use a cookie. Link to comment https://forums.phpfreaks.com/topic/103284-login-duration/#findComment-529075 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.