|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-10-06 20:39 UTC] bishop@php.net
-Status: Open
+Status: Duplicate
-Package: Feature/Change Request
+Package: *General Issues
[2015-10-06 20:39 UTC] bishop@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 21 21:00:01 2025 UTC |
Description: ------------ It should be possible to access to non-mangled form field names regardless of enctype. Background: PHP automagically formats $_POST by treating square brackets ([]) in the form names as array indicators. PHP also converts whitespaces and other special characters to underscores (_). Normally, this is useful. However, it causes problems when using complicated form field names, such as those with square brackets, whitespaces, and punctuation. Using special characters in form field names is valid HTML. When the form enctype="application/x-www-form-urlencoded", the raw data is accessible via file_get_contents('php://input'), and it is possible to construct a non-mangled version of the submitted form fields. When the form enctype="multipart/form-data", the raw data is NOT accessible via file_get_contents('php://input') or any other means. Thus, it is not possible to accept file uploads and still access the original field names. This is similar to Bug #34882, except that I am not aware of any work-around. I understand that mangling the form field names is often convenient, but it shouldn't be *impossible* to access the raw field names.