dennismonsewicz Posted October 14, 2008 Share Posted October 14, 2008 I have a programmed a couple of sites that use sessions for the login script... the problem is, is if I login to one site and begin the session and go to another site the session is still there and it acts like i am logged in... any way around this issue? Link to comment https://forums.phpfreaks.com/topic/128370-session-question/ Share on other sites More sharing options...
hcdarkmage Posted October 14, 2008 Share Posted October 14, 2008 You can create a timer script that would log someone out after so much time of inactivity (requires Javascript) or you can create a script that will do a session_destroy() if they navigate away from the site. Link to comment https://forums.phpfreaks.com/topic/128370-session-question/#findComment-665012 Share on other sites More sharing options...
dennismonsewicz Posted October 14, 2008 Author Share Posted October 14, 2008 well with the session_destroy how do you detect when a user navigates away from the page/closes the browser/closes the tab? Link to comment https://forums.phpfreaks.com/topic/128370-session-question/#findComment-665028 Share on other sites More sharing options...
discomatt Posted October 14, 2008 Share Posted October 14, 2008 Use different session names!! http://php.net/session_name Link to comment https://forums.phpfreaks.com/topic/128370-session-question/#findComment-665031 Share on other sites More sharing options...
dennismonsewicz Posted October 14, 2008 Author Share Posted October 14, 2008 so i would just rename the session after it has already registered? Link to comment https://forums.phpfreaks.com/topic/128370-session-question/#findComment-665034 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.