Support the ongoing development of Laravel.io →
Input Views Forms
Last updated 2 years ago.
0

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?

0

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)
0

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)
0

Does the table schooldatabase.users exist?

This error is not related to the in_array error you were getting previously

0

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'.

Last updated 9 years ago.
0

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

0

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

0

Sign in to participate in this thread!

Eventy

Your banner here too?

andyblem andyblem Joined 7 Nov 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.