October 28th, 2000, 12:08 AM
Does anyone know a way for me to allow the user to "log out", once they are finished? Similar to the way most professional sites have a "log out" choice, so the screen won't come up next time (I like the way AOL does it). Any ideas?
October 28th, 2000, 02:11 AM
This is tied with how you track the user through your web app. Is it by sessions or manually by cookies??
If you start a new session once a user has logged in, the logout script merely destroys that session, so that the user will have to log in again next time.
If using cookies, then simply overwrite the cookie you placed on the client. Again, this will result in the user have to login again.
Of course, no nedd (I hope) to mention that you have to develop a way to track users from page to page...
October 28th, 2000, 08:07 AM
The best way to do it is using session (I think).
When the user login store the user's variables in session variables and when the user logout destroy the variables.
Don't forget to use PHP 4.0 or above !!
** It's the world of Oscario **
October 28th, 2000, 11:13 AM
Thank you for your replies.
Sessions? Can you briefly explain how I can do that? I currently have the user fill out a form to log-in, and every page after that is passed the username and password variables (through POST).
October 29th, 2000, 02:15 AM
has a few introduction tutorial/articles to sessions and how to use them, its a good start.
here is the url: http://phpbuilder.com/columns/
look at the "Session Management"
[This message has been edited by eduany (edited October 29, 2000).]