isset and !empty not passing through a check for uploaded files
- by kalpaitch
I have an upload form with a file to be uploaded. The issue I have is that even when no file is uploaded the if(isset($_FILES)) OR if(!empty($_FILES)) still passes as successful:
$_FILES = $HTTP_POST_FILES;
if($_POST['type'] == 'photo' && isset($_FILES)){
// returns true even if no file is uploaded. What am I missing!
}