String Username;
String Password:
String Role;
Get the values of Username & Password pass them to string. reason (To prevent SQL Injection)
Actually there is simple way to create this.
Create one Database for all Users.
Username, Password, Role.
Query 1.
SELECT * FROM USERS_TBL WHERE Username="Administrator" and Password="Password" and Role="Administrator" ;
Query 2.
SELECT * FROM USERS_TBL WHERE Username="Administrator" and Password="Password" and Role="CS" ;
the best way to differentiate them is to use two different queries.
If the query one fail to get results.
you can use Query 2.
you can even remove combobox this way.
I hate to do this but this is the only close solution you can use for now.
there is more complicated way to do this. is to pass all data from users to arrays/model and do authentication by matching values using for loop.
I recommend you learn how to use classes, arrays & model. I find it hard to other student that prof don't teach this at school. you can try to ask your prof.
Thanks for calling
jncndlcpa.