|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-04-26 07:34 UTC] hofmann at isl dot org
With PHP 4.1.2 the post vars from a form are found in $_REQUEST[], but with 4.2.0 only get vars seem to be there. (same php.ini file for both versions used). PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 22:00:02 2025 UTC |
This error only occurs on multipart/form-data forms that submit array containers and contain at least one file-upload field, and occurs whether a file is uploaded or not. It appears as if PHP ignores the array name, and uses it as a straight variable name, overwriting everything that used that array name. Note that $_POST is not affected by this bug. Only $_REQUEST. The field marked as a file upload will not appear in $_POST, but I'm not sure that's a bug. Here is a sample script: ---------------------- CUT HERE ---------------------- <form action="<?PHP print $_SERVER['REQUEST_URI']; ?>" method="post" enctype="multipart/form-data"> <input type="text" name="TEST[stuff]"><BR> <input type="text" name="TEST[moo]"><BR> <input type="file" name="TEST[uploadme]"><BR> <input type="submit" value="Test"> </form> <?PHP var_dump($_REQUEST); var_dump($_POST); ?> ---------------------- CUT HERE ----------------------