[eluser]Craig A Rodway[/eluser]
You can check the emptiness of PHP's
$_FILES array to see if a file was uploaded. Something like...
Code:
if(!empty($_FILES['userfile'])){
// User uploaded file, do_upload() here...
}
Not 100% sure on that so it would be wise to do a
print_r($_FILES); in your code both when you submit a file, and when you leave it empty. You will then know which part of the array to check.