View Full Version : multiple logins for diferent departments...

06-02-2005, 02:21 PM
I have been building an intranet for my place of employment.
The business has several departments.
We want to develop areas for each individual department to take care of certain types of business.
Each of which will have a secure login to see only their own department page and options that these people should have access to. (user access)
Some persons will have access to view more than one department, possibly several. (power user access)
Some will have managerial authority to add/remove users from their department, as well as reset their groups passwords when needed. (manager access)
And some will have full administrator access to modify manager, power user, and user information as people come and go.

I started building an employee table with the following column names

id - employee - firstname - lastname - password - password_reminder - access_level - dpt_mis - dpt_switchboard ......etc.

I was hoping to set up the login through dreamweaver to grab the access level from different fields (dpt_mis, dpt_switchboard) depending on which site the user clicked to log into.

Is there a better way of doing this than the route I'm heading?

I don't want to have multiple entries of the same user with a different access level along with each entry like
greg smith mis_user
greg smith switchboard_user
greg smith switchboard_administrator

What are my alternatives?
I'm using dreamweaver along with PHP and MySQL.

06-02-2005, 05:03 PM
Create a new table


Records will be like

access_id access_desc
1 all departments
2 mis user
3 switchboard admin
4 switchboard admin

now in your orig table access_level for greg can be 2,3,4

read about joins in sql references to understand how to tie up the tables

06-02-2005, 07:04 PM
thanks for the suggestion,
you narrowed the areas I need to look into quite a bit I'm sure.
I'm still not fully sure I understand, but I'll start reading about joins and see what I can come up with.
I'm pretty new to this and am basicly doing "on the job" training here.
Thank god for forums and online tutorials