how to create a log in form with multiple user level for multiple branch php?

[Q]

New member
I'm creating a log in form that would have a Multi level user(Admin,User) with multiple branches of A and B
so if they log in as admin or user they would automatically be directed to which branch page they are registered to.
but im not sure how to do this in php

so in my Log in form:
2 inputs text for username and password
2 radio button for admin or user

so if
Manager(Admin) logs in, which is registered to branch A it would go to that page
same goes with Employee(User) logs in, which is registered to branch A it would go to that page
then same goes to Admin and user for branch B

my table users is:
Id: [Auto Increment and Primary key] [type: int]
E-mail: [username] [type: varchar]
Password: [ MD5 hashed] [type: varchar]
User Type: Admin and User [type: Enum]
Branch id: A and B [type: Enum]


if possible can you provide some sample source codes.
Thank you.
 
Back
Top