PHP 4.0 Bug #4335 Updated: Missing variable in $HTTP_POST_VARS when uploading a file through a form

From: Date: Sat, 10 Feb 2001 19:18:55 +0000
Subject: PHP 4.0 Bug #4335 Updated: Missing variable in $HTTP_POST_VARS when uploading a file through a form
Groups: php.dev 
Request: Send a blank email to php-dev+get-46245@lists.php.net to get a copy of this message
ID: 4335 Updated by: jimw Reported By: noor@comrax.com Old-Status: Open Status: Closed Bug Type: Feature/Change Request Assigned To: Comments: addressed in 4.0 with HTTP_POST_FILES. Previous Comments: --------------------------------------------------------------------------- [2000-05-05 04:51:26] noor@comrax.com Do the following simple steps to reproduce the problem: In index.html put: ------------------ <html> <body> <form method="post" action="phpinfo.php" enctype="multipart/form-data"> <p><input type="file" name="FileVariable" size="30"></p> <p><input type="submit" value="Send File"></p> </form> </body> </html> In phpinfo.php put: ------------------- <? phpinfo( ); ?> Now, go to index.html and press Browse to select a file from your hark drive. Then, press the "Send File" button. After you've submitted the form, scroll down to "PHP Variables" section, and notice that there are 4 variables, which are: PHP_SELF HTTP_POST_VARS["FileVariable_name"] HTTP_POST_VARS["FileVariable"] HTTP_POST_VARS["FileVariable_size"] Have you noticed already? Where is the HTTP_POST_VARS["FileVariable_type"] variable? I know I can access it through $FileVariable_type, but it is more secured to access it through HTTP_POST_VARS["FileVariable_type"] when I know that the form uses POST method. Thank you for your help. --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=4335&edit=2

« previous php.dev (#46245) next »