gloveny Posted April 24, 2007 Share Posted April 24, 2007 Hi all, I used PHPBB as the initial site but gradually pahsed it out untill I was left with just using the login system and the tracking code so I could keep track of users. I finanly got rid of that and made my own log in system. As long as the user stays "in the site" loading page window by page window everything is fine. But if say they open a profile which lanuches in to a new window, suddenyl tehy get logged out. The way I implemented the "stay logged in" system was simple to call session_start() at the top of every page and make sure that $_SESSION["user_id" was alwasy set to something higher than 0. I've treid emitting the session_start() call in the pages that get launched in a new window but its still logs out the user. I really dont understand this, can someone please explain why this happens? Thanks, look forward to your reply. Graham Link to comment https://forums.phpfreaks.com/topic/48517-sessions-users-stay-logged-in-untill-they-open-a-pop-up-or-external-page/ Share on other sites More sharing options...
MadTechie Posted April 24, 2007 Share Posted April 24, 2007 your have to check that page for anything that handles sessions.. not much more i can suggest Link to comment https://forums.phpfreaks.com/topic/48517-sessions-users-stay-logged-in-untill-they-open-a-pop-up-or-external-page/#findComment-237367 Share on other sites More sharing options...
gloveny Posted April 25, 2007 Author Share Posted April 25, 2007 MadTechie, could you elaborate on that? Cheers.... Link to comment https://forums.phpfreaks.com/topic/48517-sessions-users-stay-logged-in-untill-they-open-a-pop-up-or-external-page/#findComment-237890 Share on other sites More sharing options...
MadTechie Posted April 25, 2007 Share Posted April 25, 2007 the window that opens, check the code for anything that says session ie $_SESSION, $session_destory() etc Link to comment https://forums.phpfreaks.com/topic/48517-sessions-users-stay-logged-in-untill-they-open-a-pop-up-or-external-page/#findComment-237977 Share on other sites More sharing options...
taith Posted April 25, 2007 Share Posted April 25, 2007 if your session var is "$_SESSION["user_id"]", also check for $user_id... if your globals are registering, those two will interfere Link to comment https://forums.phpfreaks.com/topic/48517-sessions-users-stay-logged-in-untill-they-open-a-pop-up-or-external-page/#findComment-237986 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.