Hey,
I have set this form up to have users upload files to the server.
<form enctype="multipart/form-data" action="up2.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
Send this file: <input name="userfile" type="file">
<input type="submit" name="submit" value="Send File">
</form>
If the user doesn't enter a value in the form before clicking on the "Send File" button, an error message is displayed.
The problem is when I first run this script I get the error message displayed
The first line of the up2.php file is
if (!isset($HTTP_POST_FILES['userfile'])) {echo "No file sepecified"; exit;
}
And when i don't enter anything in the form and click on "Send File" i don't get the error message saying "No file..."
Any suggestions?
Thanks