I am doing a project for school, and I am new to php and mysql.
I have to create one loginpage with 3 different users like corres, principal and the staff
In the table field what type I have to give like ENUM or SET?
I want to assign 0 for corres,1 for principal and 3 for staff.
How to do this, and should I give any field in the login page in php?
But I am going to create only 2 tables one for corres and other one is for staff
correc table fields are
corrs_id,username,password,staff_id,staff_role
staff table fields are
staff_id,staff_role,name,qualification,address,state etc.
Both the tables have 2 common fields staff_id and staff_role.
Now how to connect 2 tables, and when username and password is given it should first check the staff_role like principal or a staff using staff_id from the corres table according to tht the page should open.
Please help me in this project.
Put all the fields in the same table and add another field like staff_role (Tree structure).
and based on the value returned from this field redirect to the particular page.
Say table has these data
employee_id emp_name password emp_role
and data like
3 Jack password staff
Algorithm