Jump to content

Deny user the ability to open 2 copies of a webpage


jasonlfunk

Recommended Posts

I have made scheduling system that uses multiple databases and the user can switch between the databases depending on which Schedule they want to edit. The database that they are using currently is stored in a SESSION variable. I am running into a problem that if the user has a page open and a database selected, and then opens another page and changes the database and then returns to the first page and edit information in the first database- unexpected things happen because the handler functions uses the new database even when the user passed it old information. What I want to do is when the user opens a second copy of the page, it tells them that they aren't allowed to have two copies of the scheduler open. I hope this makes sense.

 

Also: I am self taught in PHP and I know it pretty well, but I am not very aware of design schemes for systems using php. Such as a multiple user access controlled system using SESSIONs. Are there any sites/tutorials that cover these design issues for PHP?

You should probably just make it so that there is a difference between the forms, depending on what database they are in. Something like a hidden input that has a value of the database would work. Then, when you accept the form, check that value agaist the actual current database and change the form if it is wrong.

 

I don't think there is an easy to way to tell if someone has two windows of the same location open.

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.