$upload_file = $HTTP_POST_FILES['flocation']['name']; echo $upload_file;
$temp = $HTTP_POST_FILES['flocation']['tmp_name'];
$extension = substr($upload_file, -4);
if($upload_file == ""
{
// NO UPLOAD
} else {
// UPLOAD
}
Hi, I was wondering what's wrong with the above code (or if there's a better solution). I have a form with a field <input type="file" name="flocation"> and then the above carries out the form when it's submitted. I need to check if the user left it blank or not but I can't seem to get the above to work. I'd be greatful for your help. Thanx
$temp = $HTTP_POST_FILES['flocation']['tmp_name'];
$extension = substr($upload_file, -4);
if($upload_file == ""

// NO UPLOAD
} else {
// UPLOAD
}
Hi, I was wondering what's wrong with the above code (or if there's a better solution). I have a form with a field <input type="file" name="flocation"> and then the above carries out the form when it's submitted. I need to check if the user left it blank or not but I can't seem to get the above to work. I'd be greatful for your help. Thanx