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

From: Date: Fri, 05 May 2000 08:51:27 +0000
Subject: Bug #4335: 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-18441@lists.php.net to get a copy of this message
From: noor@comrax.com Operating system: FreeBSD 4.0-STABLE PHP version: 3.0.16 PHP Bug Type: Feature/Change Request Bug description: Missing variable in $HTTP_POST_VARS when uploading a file through a form 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.

« previous php.dev (#18441) next »