i want to make a website that contains admin section and i needed that at a perticular time only one user can enter threw the admin section.. How can i achive this ( threw php)?
Hi
I think - you need to restrict the admin logins. ie) At a time only one admin can view the admin section, Right?
In your user table add the columns called timein (time stamp) and stillin (enum).
When an user entered into the admin area - update the flag stillin as "Y" and put the current time. When logged out has happened make this flag as "N"
If the second user tries to enter admin area - check whether already an user is there (on comparing the stillin flag)
If the timein value is say more than 2 hours changed the stillin flag as "N" to any other user.
Just think this logic - There might be other logics too
Thanks
Subash