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
https://forums.phpfreaks.com/topic/99352-mysql-php-user-account-database/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.