Page 1 of 1
i have problem
Posted: Tue Apr 17, 2007 1:34 am
by gpong
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

Posted: Tue Apr 17, 2007 2:50 am
by CoderGoblin
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.
Posted: Tue Apr 17, 2007 6:47 am
by Ollie Saunders
Try
Google Query wrote:PHP (permissions OR "access control")