tags:

views:

65

answers:

2

I have one login page used by all users on the site. However, once they login, they go to different pages.

The users are currently stored in different tables in the database and I need to check to see which page I should navigate to.

Does this mean that I should add all these users to a single table and specify the kind of user?

What's the best way for me to organize things?

+4  A: 

It would probably be best to keep all your users in one table, it will make things easier to maintain. You can have the login script read the user type, and direct them to the correct homepage.

Jimmy
+4  A: 

A basic role based schema would probably make things a lot easier on you here.

Users
   Id
   Name
   ...
Roles
   Id
   UserId (ForeignKey=>Users)
   ...

Then when you do any sort of authorization it's a simple role check to see if they have privileges.

thismat
Thank you for your answer it is useful
Sarah