RE: [PHP] File Upload Form
Hello, I found the solution to my problem here it is. Adding the following line in the HTML seems to make the PHP code work well with the Upload Form. !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN Don't know why but, I guess this makes the document HTML compliant. Regards, Sharat -Original Message- From: Sharat Hegde [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 3:13 PM To: [EMAIL PROTECTED] Subject: [PHP] File Upload Form Hello, The PHP manual provides a method for File Upload. The sample code is as follows: FORM ENCTYPE=multipart/form-data ACTION=_URL_ METHOD=POST INPUT TYPE=hidden name=MAX_FILE_SIZE value=1000 Send this file: INPUT NAME=userfile TYPE=file INPUT TYPE=submit VALUE=Send File /FORM While this works when this is part of an HTML page, it strangely does not work when it is part of a PHP3 file. I found this to be problem with my PHP page after some struggle. Any reasons why this does not work in a PHP3 file? Regards, Sharat * Disclaimer: The information in this e-mail and any attachments is confidential / privileged. It is intended solely for the addressee or addressees. If you are not the addressee indicated in this message, you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] * Disclaimer: The information in this e-mail and any attachments is confidential / privileged. It is intended solely for the addressee or addressees. If you are not the addressee indicated in this message, you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] File upload form
sniped for brevities sake ;) Chris, Have you asked what browsers they are using? Also, what are you using to serve this page? chuck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] File upload form
Have you asked what browsers they are using? This happens primarily on IE but it also happens using NS Also, what are you using to serve this page? ? PHP 4.0.4 and Apache. Chris
RE: [PHP] File upload form
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 theENCTYPE=multipart/form-datais included in the form definition? And why only for a very small subset of users? Thanks for any insight you can give! Another thing of note: These same users that are having problems with my file upload form are not having problems with Yahoo!'s email attachment form (a file upload form as well). So I copied all the same HTML code from that form and put it on my site to test. The only thing I changed was the ACTION field and I modified their Done button to be a submit button. When they submitted that form, the POST vars didn't come through either. The only thing I can think of is that there is an issue with our Apache or, more likely, our PHP configuration. However, I'm not sure of where to even start looking. Again, any help would be greatly appreciated! Chris
RE: [PHP] File upload form
Again, any help would be greatly appreciated! could be a browser specific issue. have you checked into the possibility that people having problems are all using the same browser? I don't know what all of them are using, but most are using IE. I don't know how feasable it would be to get them to all change browsers, especially when they are not having this problem on other sites (Yahoo, for example). The problem is originating from my server. There is some combination of the ENCTYPE of the form and some setting on our server that is causing the POST vars not to get sent. Chris