Re: A general UL script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux