File input validation

Posted by Emanuil on Stack Overflow See other posts from Stack Overflow or by Emanuil
Published on 2010-05-30T00:06:46Z Indexed on 2010/05/30 0:12 UTC
Read the original article Hit count: 356

Filed under:
|
|

You have a web page with a form that has an input field of type file. You have another web page that expects the data from the first page.

In the second page you need to check whether a file has been sent.

How do you do that?

I've been using the following statement but I'm not sure about it:

$_FILES["file"]["tmp_name"] == ""

© Stack Overflow or respective owner

Related posts about php

Related posts about validation