Okay, I'm developing a script that requires authentication. I've got the script working by getting data from a user table in mysql and setting up session variables for each login. This all works fine. Now, my project calls for a bit of a tricky maneuver....
Basically, the protected inner page will have updatable forms (updating tables in mysql). I only want 1 user at a time to be able to write to these tables for obvious reasons. So, If I login as the first person for that session, I will have write access. Anyone else that logs in after me will only have read access. If I logout, it will reset and the next person to login will again have write access. Mind you, I only plan to have about 3 or 4 people with access to this page, however, the important thing is that if I login, the user with write access will be printed on the screen so I can boot him if necessary.
I hope I've explained this so it can be understood. I'm just looking for a push in the right direction. I'm sorta stumped here so any idea will do 🙂
Thanks for the help!
--Tom