View Single Post
  #2 (permalink)  
Old May 8th, 2006, 04:34 AM
Kati Kati is offline
Registered User
 
Join Date: May 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi banned

First thing you have to do is to add a field to your "Users" Table ,"level" for instance . Then for every user you can specify whether the user is an "admin" or not.

Then when the user logs in, you check the level field , if it's "admin" then redirect the user to admin's control panel, else redirect them to another page .

BTW why not writing the code with wich you check a user as a function and calling it on every page ?
It's more flexible and secure . You don't have to change it one by one on every page whenever there's a change in codes .

Hope it helps :)

Reply With Quote