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? Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.