When you upload the file output the value of the MIME type so that you know what type of file the server sees it as.
echo "Upload failed: File must be a JPEG file type and 10KB or less in size<br />\n";
echo "The real MIME type is: {$_FILES['userfile']['type']}.<br />\n";
echo "The real file size is: {$_FILES['userfile']['size']}.<br />\n";
That said, the MIME type for .txt is text/plain. The MIME type for .doc is application/ms-word .. output the 'type' value to get the MIME type for the other extensions that you want to be able to upload.
If you want the user to be able to upload any type of file, remove the MIME type testing all together.
if ($_FILES['userfile']['size'] <= 10000)
That still leaves a size constraint of 10KB. Increase that number for larger files. Don't forget there is an upper constraint of 2MB in the php.ini file.
Regards,
Rich
::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::