Originally Posted by patryk
oh but you do.
Debbie is correct in wanting to use server side validation and you shouldn't sway anyone from that. The one thing that you can do is to check the incoming headers (easier said than done using non apache servers though) to see what details the browser has sent about itself and the host OS. Admittedly thats going into unwanted complexity though and when you start on that you'll end up starting on your own tracking software etc which you really don't need.
@Debbie the revised code you showed above should do it. It checks that the $_FILES field is set and that it is not empty. That would also be the way I would do it. You could also use array_key_exists() to make sure that the correct form field exists in the $_FILES array if you want