Jump to content

If and Empty


Daney11

Recommended Posts

Hey guys,

 

Im using

 

if(!empty($_POST['file'])) {
$file_name = 'NULL';
}

if(!in_array($ext,$allowed_filetypes, $_POST['file'])){
   $errors[] = 'Please Make Sure Your File Is Below 512kb In Size and is in .gif Format';
            }

 

Basically i want my code to find out if

<input name="file" type="file" />

 

Is empy or is it has a location set inside it.

 

If it is empy i want the $file_name to be NULL.

Link to comment
https://forums.phpfreaks.com/topic/94769-if-and-empty/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.