note 14541 added to features.file-upload.php

From: Date: Fri, 03 Aug 2001 04:41:01 +0000
Subject: note 14541 added to features.file-upload.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-16259@lists.php.net to get a copy of this message
I had a problem uploading files using php4 on Windows 98, and testing on an IE5 browser. Only certain files (e.g. .TXT files) were uploaded, but others returned a filename 'none'. I couldn't see the problem in PHP as I had the correct php.ini settings etc. The answer was in the HTML form: <FORM ENCTYPE="multipart/form-data" ACTION="upload.php" METHOD="POST"> Send this file: <INPUT NAME="userfile" TYPE="file"> <INPUT TYPE="submit" VALUE="Send File"> </FORM> When I placed METHOD="POST" first, before ENCTYPE and ACTION, it worked fine: <FORM METHOD="Post" ENCTYPE="multipart/form-data" ACTION="upload.php"> I don't know the reason for this, but it might help others in the same situation. I do not know whether the same applies to Netscape/Mozilla , Opera etc. http://www.php.net/manual/en/features.file-upload.php

« previous php.notes (#16259) next »