Monkofdoom Posted April 13, 2007 Share Posted April 13, 2007 For the past 18 months I have been working on a project which is now a considerable size, it consists of many hundreds of pages and I have a slight problem. I only want people to be able to log in once at a time per account. For cross browsers the problem is solved but for tabs I'm not sure of a solution. For example when someone is logged in and middle clicks on a link in firefox it opens the new page in a new tab... From this I need the old tab to become disable in some sense - When they click on something within the old tab it should detect they've opened a new tab and no longer work, return them to the home page. I know for smaller sites you can use things such as: on form_page_2 did the user come from form_page_1 on form_page_3 did the user come from form_page_2 etc But due to the size of this project it wouldn't be possible to identify where each page is coming from / going to and whether it's a legal move as there are too many combinations... If you need any more information as to the problem please let me know and I will try and explain... Thank you for your time. - Monkofdoom Quote Link to comment https://forums.phpfreaks.com/topic/46890-sessions-tabs-browsers/ Share on other sites More sharing options...
wildteen88 Posted April 13, 2007 Share Posted April 13, 2007 tabs should share the same session. So if someone goes to your site and opens two tabs, lets call these tabA and tabB If the user logins on in tabA, when they go to tabB and refresh the page or click on links then they should be logged in. If they logout in tabA then they should be logged out in tabB, only if they do a refresh/click a link on the page. However this behaviour depends on how you track users being logged in Every page that should be protected should have some form of checking whether the user is logged in. An easy way of tracking users is sessions. Quote Link to comment https://forums.phpfreaks.com/topic/46890-sessions-tabs-browsers/#findComment-228823 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.