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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.