treblechamp Posted April 3, 2008 Share Posted April 3, 2008 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 Quote Link to comment Share on other sites More sharing options...
aschk Posted April 3, 2008 Share Posted April 3, 2008 I think you have answered your own question , 2 tables is the more sensible layout (user maps to privileges). What happens when you need another level? Another table? I don't think so somehow... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.