merck_delmoro Posted May 8, 2009 Share Posted May 8, 2009 may I know how to logout the user when the browser get close ??? for security purposes so no one can view someones account when they forgot to log off when they close the browser Link to comment https://forums.phpfreaks.com/topic/157323-how-to-make-an-auto-logout-when-the-user-close-the-window/ Share on other sites More sharing options...
Ken2k7 Posted May 8, 2009 Share Posted May 8, 2009 Use sessions if it is that important. Link to comment https://forums.phpfreaks.com/topic/157323-how-to-make-an-auto-logout-when-the-user-close-the-window/#findComment-829220 Share on other sites More sharing options...
GingerRobot Posted May 8, 2009 Share Posted May 8, 2009 Indeed - if you are using sessions in order to implement a login then users will be logged out when they close their browser anyway. It you're concerned about security, you could also ensure that the user's not been inactive for more than x minutes. You might like to check out this tutorial on cookies and sessions if you're not too comfortable with them: http://www.phpfreaks.com/tutorial/sessions-and-cookies-adding-state-to-a-stateless-protocol Link to comment https://forums.phpfreaks.com/topic/157323-how-to-make-an-auto-logout-when-the-user-close-the-window/#findComment-829290 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.