I am trying to check that all my fields in my form have value when submited. So instead of using isset i am using in_array, but get an error (Wrong datatype for second argument)
ha lol thats true thanks for spotting that. On another note, i am trying to see if my posted form has all fields filled in, but it looks like in_array is not what i should use as it’s not checking if it set (like isset)? any ideas? i dont want to check each individual field if its set or not, but would to use a loop.
Alternatively, make an $invalidFields array and when a bad field is found, put the field name into the array. Now you can tell the user exactly which fields were missing.
-1 will catch all possible errors including E_STRICT, E_DEPRECATED etc. and those errors might go to E_ALL in php 6, so catch it now and your code will be compatible with future versions of php.