0

hiya in my database i have a users table

Create Table Users(

user_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
email varchar (40) NOT NULL,
pass CHAR (40) NOT NULL,
first_name varchar (15) NOT NULL,
last_name varchar (30) NOT NULL,
active CHAR (32),
registration_date datertime NOT NULL,
PRIMARY KEY(member_id),
UNIQUE KEY (email),
KEY (email, pass)
)

I want the administrator to be able to login from the same location as the user however when logged in different admin links would appear for the admin pages How would i do this if someone could pleaase let me know i would be greatful

thanks Brims

2
Contributors
1
Reply
5
Views
11 Years
Discussion Span
Last Post by campkev
0

well, first of all, you need a field that indicates whether they are administrator or not
i would suggest something like

admin tinyint NOT NULL Default 0

set it to 1 for administrators

Second, well that will depend on what you are coding in.
In asp, I would check that flag during the login process and set a session variable. Have your page check that session variable and only display the admin links if value is 1.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.