Try this:

  if(!isset($_FILES['userfile']['name'])
                || $_FILES['userfile']['error'] == UPLOAD_ERR_NO_FILE) {
     // the file was not uploaded
  }
  else {
     // do your thing,the file has been uploaded
  }

Børge Holen wrote:
When I use a normal single file upload form; both of these statements will continue wether my form is empty or not, why?

if(!empty($_FILES)){
        do som checking if its a jpg.
        if not exit;

if(isset($_FILES)){



--

_____________________
Myron Turner
http://www.room535.org
http://www.bstatzero.org
http://www.mturner.org/XML_PullParser/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to