Quite a simple one this I imagine.
I'm submitting a form with text and images.
I validate the text by checking the variable length !=0 etc.
I need an effective way to check if the variable that should have a file within does.
This is the code so far...
if(!$afterphoto){
$form->setError($field, "After photo not entered");
}
This doesn't seem to be working, what would be a better checker?
Thanks.
Solution to this was to use the following code to check that there were no errors and the file was uploaded:
$afterphoto['error'] != 0