Re: A general UL script

From: Date: Sun, 29 Oct 2006 04:45:00 +0000
Subject: Re: A general UL script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-243815@lists.php.net to get a copy of this message
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/

« previous php.general (#243815) next »