I am trying to validate a form....I have a drop menu populated from a table. Upon submission I want to check the chosen fields against the valid options in the table.
ie: array of numbers from database table: 1,2,3,4,5
user chooses: 2,4 (field name options[])
I know you can check a single value against an array with:
if( in_array($variable, $arr) )
but what do I set as my $arr and how do I allow for multiple $variable options?
Any help is appreciated