Jump to content

MySQL PHP user account database


treblechamp

Recommended Posts

I am currently trying to construct the best was to have multiple user accounts for different types of access. Basically i have three types of user: User, Admin and Review which will have different html/php pages when they log into my website. I am trying to gather whether i need  3 different tables for these users to make sure that the correct user type can sign into their own area of the site or can i have 1 table with username, password etc... and also a User Type field so the php code would validate if a person can get into the area by running a check on what is listed in this field.

 

e.g. A User  would be entered in a single table which will hold a username, userID, password, Email, Type. The type field in this instance would be 'User'. The php code would check the username and password is correct and depending on what area of the website they went to the php code would also check that they are a 'User' and grant them access. If the Type is not listed as 'User' then they would not be granted access.

 

Do you feel having the one table would be most effective? Please give me any directions to where i could improve this and possible suggestions.

 

Thanks

 

Phil

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.