Jump to content

check for file


182x

Recommended Posts

I am using the following structure but no matter what I do now it calls the last else and does not upload even if a file has been selected. Have I used the empty function in the wrong way?

 

<?php
session_start();

if(strlen($_POST['description']) > 4000)
{
//error msg


}


else{

if (!empty($_FILES))
{
//upload




}

else
{

//don't upload
}
}
?>

Link to comment
https://forums.phpfreaks.com/topic/60009-check-for-file/#findComment-298469
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.