jasonlfunk Posted September 7, 2007 Share Posted September 7, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/68401-deny-user-the-ability-to-open-2-copies-of-a-webpage/ Share on other sites More sharing options...
lemmin Posted September 7, 2007 Share Posted September 7, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/68401-deny-user-the-ability-to-open-2-copies-of-a-webpage/#findComment-343874 Share on other sites More sharing options...
jasonlfunk Posted September 7, 2007 Author Share Posted September 7, 2007 Not the best solution but it will work for my purposes. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/68401-deny-user-the-ability-to-open-2-copies-of-a-webpage/#findComment-343888 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.