I am trying to successfully use the PHP empty()
function. Currently my script references the input file field variable:
<input class="fileUpload" name="flyer" type="file" />
like this:
if (empty($_FILES['flyer']['name'])) {
//don't update the file
}
else {
//update the file url
}
This currently updates the file URL to a value of null
if it's empty. The problem could be something else but I think it's my variable reference. How can I correct this to get the empty
function to work?