What error are you getting?
Generally you don't get an array from a radio as only one can be selected.
If you var_dump input what do you get?
Here is the error
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'schooldatabase.users' doesn't exist (SQL: select * from `users` where `username` = andyblem and `staffstudent` is null limit 1)
Here is the error
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'schooldatabase.users' doesn't exist (SQL: select * from `users` where `username` = andyblem and `staffstudent` is null limit 1)
Does the table schooldatabase.users exist?
This error is not related to the in_array error you were getting previously
elite123 said:
Does the table schooldatabase.users exist?
This error is not related to the in_array error you were getting previously
Extending @elite123,
Check your database config to make sure you're using the right database connection, and if you are, then check your database tables to make sure users table exists within 'schooldatabase'.
The users table does not exist. I want to specify which table it should search. Like when a user selects the staff radio button when logging in, it should search in the staff table and log inhj the user, the same should be done if the user selects the student button
You should probably have staff and students in the same table with a field indicating if they are staff or student - or you may need 2 fields if like at my previous employer you could be both.
An interesting read: http://stackoverflow.com/questions/18785754/authentication-with-2-different-tables
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community