File upload form

From: Date: Tue, 22 May 2001 18:53:56 +0000
Subject: File upload form
Groups: php.general 
Request: Send a blank email to php-general+get-53896@lists.php.net to get a copy of this message
Below is the (very) simple form that I'm using to allow users to upload files to my site: ----------------------- <html> <head> <title>Upload Attachment</title> </head> <body > <br> <center> <h3>Upload File</h3> You are uploading from an unsecure server.<br> <FORM ENCTYPE="multipart/form-data" ACTION="/upload.php" METHOD=POST name="uploadForm"> <table border=0 width="65%"> <td colspan="4" align="center"> <input type="file" name="uploadfile" size="50"> </td></tr> <td><br></td></tr> <th align="center" valign="center"> <input type="submit" name="submit" value="Send This File" onClick="document.uploadForm.upload_file_name.value = document.uploadForm.uploadfile.value"> </th></tr> </table> </center> <input type="hidden" name="upload_file_name" value=""> <input type="hidden" name="site_key" value="d3d3LmNhcmliYmVhbnByZXN0aWdlLmNvbQ=="> <input type="hidden" name="host_key" value="cGFudGhlci53aWxkLm5ldA=="> <input type="hidden" name="db_key" value="Y2FyaWJiZWFucHJlc3RpZ2U="> <input type="hidden" name="https_key" value="MA=="> <input type="hidden" name="reg_file" value="d3d3LmNhcmliYmVhbnByZXN0aWdlLmNvbS9pbnRlcmFjdGl2ZS9sb2dpbi91cGxvYWRfZ mlsZXMvcmVnaXN0ZXJfdXBsb2FkX2ZpbGUucGhw"> </form> <br><br> <center><a href="" onclick="window.close(); return false;">Close Window</a></center> <br><br> </body> </html> ----------------------- The problem that I'm experiencing using the above form is that when some users (and the problem is consistent for those users) submit the above form, *none* of the POST variables are getting passed to the receiving page. None of the hidden variables, not the "input type = file" variable, _nothing_. However, the majority of my users have absolutely no problem using this form. Just those very few. Now, when I change this line: <FORM ENCTYPE="multipart/form-data" ACTION="/upload.php" METHOD=POST name="uploadForm"> to this: <FORM ACTION="/upload.php" METHOD=POST name="uploadForm"> (ie, remove the ENCTYPE="multipart/form-data"), all of the POST data gets sent to the receiving page for those users. What is going on? Why is the POST data not getting sent to the server when the ENCTYPE="multipart/form-data" is included in the form definition? And why only for a very small subset of users? Thanks for any insight you can give! Chris

« previous php.general (#53896) next »