Hi, Saturday, December 14, 2002, 1:03:05 PM, you wrote: MK> Hi everybody,
MK> I'm trying to upload a file using the following scripts, but it doesn't MK> work, it actually doesn't get through the first line of PHP script at all MK> and displays "a problem has occured" message. I'm running the script on RH MK> Linux/PHP4. Is there anything I'm missing here??? MK> Many thanks in advance, MK> Miro. MK> --------------------------------------------------------------------- MK> [upload_file.html] MK> <html> MK> <head><title>File Upload</title></head> MK> <body> MK> <form id="data" method="post" action="input_file.php" MK> enctype="multipart/form-data"> MK> <p> MK> Choose a file: <br> MK> <input name="testfile" type="file" size="50" maxlength="100000"><br> MK> <input name="submit" type="submit"> MK> </p> MK> </form> MK> </body> MK> </html> MK> [input_file.php] MK> <?php MK> if ($testfile) MK> { MK> if (is_uploaded_file($testfile)) MK> { MK> echo "userfile: $testfile<br>\n"; MK> echo "userfile_name: $testfile_name<br>\n"; MK> echo "userfile_size: $testfile_size<br>\n"; MK> } MK> else MK> { MK> echo "no file updated"; MK> } MK> } MK> else MK> { MK> echo "a problem has occured"; MK> } ?>> You are missing this bit: <input type="hidden" name="MAX_FILE_SIZE" value="100000"> -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php