If ($ _ FILES ['files'] ['name']! = "") Is launched if the files are not launched, if there is no headache in the files

Unlucky with my other thread with specific code, so if I can, I would like to ask how people will try to get this to work.

I have a page where my client edits the details of the property displayed in the property list, say that they edit the text and do not add any images to this property.

The HTML form works fine, I'm just looking at php.

Example:

If files selected then run this script as an include If no files selected then exit 

Something like that...

 if($_FILES['files']['name']!="") { Do this } else { exit(); } 

I'm going to die to figure this out, so any help or suggestions would be great. I have tried several variations and variations at the top of these variations, and nothing has been working so far.

Greetings

+1
source share
1 answer

Use isset() or empty() constructs. (For more information read the PHP doc)

 if(!empty($_FILES['files']['name'])) { // } 
+4
source

All Articles