jeremyhowell Posted December 14, 2009 Share Posted December 14, 2009 I want to keep people from opening multiple tabs, or sessions of my Facebook app. Is it possible to check if a session is currently running of my app, like maybe using a cookie or something? Link to comment https://forums.phpfreaks.com/topic/185030-check-if-another-session-of-the-page-is-running/ Share on other sites More sharing options...
mikesta707 Posted December 14, 2009 Share Posted December 14, 2009 you could just use sessions, and check if one is set if (isset($_SESSION['whatever'])){ //they are already viewing } But that may lead to unwanted results. For example, if you have that check doing something like if (isset($_SESSION['var'])){ //don't let the user play } else { //let them play } then if the user refreshes the page, they won't be able to play again until they close the connection to the server (IE closing the page/browser) Link to comment https://forums.phpfreaks.com/topic/185030-check-if-another-session-of-the-page-is-running/#findComment-976703 Share on other sites More sharing options...
jeremyhowell Posted December 14, 2009 Author Share Posted December 14, 2009 Okay, thanks you. Link to comment https://forums.phpfreaks.com/topic/185030-check-if-another-session-of-the-page-is-running/#findComment-976706 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.