Results 1 to 2 of 2
Thread: Need help with Log-Out
Sep 6, 2011, 20:32 #1
- Join Date
- Aug 2010
- 1 Post(s)
- 0 Thread(s)
Need help with Log-Out
I know this will probably sound really silly, but I need help designing a "Log Out" feature on my website...
1.) What should a Log Out do exactly?
Log you out in the background?
2.) How exactly do you Log-Out a user?
$_SESSION['loggedIn'] = FALSE;
My Log-In system currently relies entirely on Sessions, so other than a "Session Cookie", I am not using Cookies to log people in and out. Nor am I using a database for this.
Sep 6, 2011, 22:03 #2
A logout should log you out .
If you want to prompt the user ('are you really sure you want to log out?') is up to you. Most sites don't.
If the user is on a 'logged in only' page when he logs out, then you should redirect him to a 'visible to all' page (the home page for example). If he is on a 'visible to all' page already, there's no need to redirect.
How? All three methods you list seem ok to me. The first is the most drastic. If you store other information in the session as well that you may need even if the user isn't logged in, then I'd go with 2 or 3.Guido - Community Team Leader
The Votes Are In: The Winners of the 2013 Community Awards are...
Blog - Free Flash Slideshow Widget