Click here to Skip to main content
15,909,607 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi there.

How does one create a log in (for an admin) that allows them to log in and then a certain page link is shown only for the logged in admin. Also, how can I ensure that the admin user will be logged in until inactive or logged out.

For example, I'm creating a website where members can sign up and post on a discussion board. I want to be able to give users with admin accounts the only access to this link (preventing regular users from editing or deleting members and posts). However, I also want to prevent regular users from typing in the admin page URL which would give them access to that page.

On top of all that I was wondering if anyone knows how I can keep the admin logged in until they log out or are timed out of the session.

Thanks,

Joel.
Posted
Updated 26-Aug-13 2:57am
v2
Comments
Sergey Alexandrovich Kryukov 25-Aug-13 22:46pm    
The problem is not clear.
—SA
Santhoshpettacode 26-Aug-13 9:58am    
The example what you mentioned there is that saying that both the user and admin can login in same website or different login

1 solution

So you can make some of your process mentioned above can be done in PHP by using session handling, Ones the admin logged in, generate a separate URL for the admin usage separately and make this will be unknown form other user .- this is my suggestion up to what I understand your question.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900