Jump to content

Check if another session of the page is running?


jeremyhowell

Recommended Posts

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)

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.