User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 391,873 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,384 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 2390 | Replies: 1
Reply
Join Date: Nov 2005
Posts: 44
Reputation: Brims is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Brims Brims is offline Offline
Light Poster

user table in my database

  #1  
May 21st, 2006
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2005
Location: Dallas, TX
Posts: 481
Reputation: campkev is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: user table in my database

  #2  
May 23rd, 2006
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MySQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 6:57 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC