Jump to content

Different Logins


ChompGator

Recommended Posts

Im trying to set up a certain type of login - which Ive never done before -

When - Employee's login - they see "Certain links"

When Managers Login - they see the links the employee's see, plus additional "managers links"

When Vice-Presidents Login - they see all the links employee's see, managers see, and additional "vp links"

 

So what I did was set up a login, with 3 levels of access, when a user puts their username then password in - they then select from a drop down menu if they are level 1 access, level 2 access, or level 3 access. Then they hit submit, the information gets verified in a database(username, password, access level) ...

 

Problem is, as I know how to direct the login to whatever page is applicable for their access level, but I dont understand how I can I guess start the session? so that each user if they want can set up their profile, or whatever.

 

So basically like all employees would see the same links, but in a sense they wouldn't be the same links because each user can customize his/her own area.

 

Anyone have any good advice or know of any tutorials for doing this sort of thing?

Link to comment
Share on other sites

I wouldn't even give them the choice of what level to pick, you should set that level in the Database with their user record.

 

When they login, you check that status, and based on that you can do what you like.

 

Use session_start() at the top of everypage, when they login set their leve like $_SESSION['level']=2 then whatever page they can see, you check to see if they are that level, and if not, redirect them away to a different page.

 

You can use less than or greater than formulas to determine if they can see certain pages if it allows multiple levels to view.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.