i have problem
Moderator: General Moderators
i have problem
is anybody know how to make rights using php. For example: if I am an admin so I can delete user id and I can do everything in the web page. and if I am a user I just can post or reply topic to web site. if everyone know website that provide this information then post it. thank you very much 
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
Quite often you have 3 levels of user...
0 - Guest
1 - User
2 - Admin
By default everyone is user level 0, when they log in they are assigned a user level from the database (either 1 or 2). This is normally stored in a session. When someone tries to do an admin function the code checks the user level and rejects it if the user is level <2.
Hope that helps.
0 - Guest
1 - User
2 - Admin
By default everyone is user level 0, when they log in they are assigned a user level from the database (either 1 or 2). This is normally stored in a session. When someone tries to do an admin function the code checks the user level and rejects it if the user is level <2.
Hope that helps.
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK