#24344 [NEW]: $_POST to create an array when name is repeated
| From: | tjedmunds at yahoo dot com | Date: | Thu, 26 Jun 2003 13:32:35 +0000 |
| Subject: | #24344 [NEW]: $_POST to create an array when name is repeated | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-42539@lists.php.net to get a copy of this message | ||
From: tjedmunds at yahoo dot com
Operating system: Linux
PHP version: 4.3.2
PHP Bug Type: Feature/Change Request
Bug description: $_POST to create an array when name is repeated
Description:
------------
It would be very useful if PHP would automatically create an array for
$_POST when the same input field name occurs multiple times in a POST'ed
form. This can be accomplished by putting [] after the name in the form
but that is not always an option for every application (such as wrapping a
Perl cgi or writing a 'remote' browser). $HTTP_RAW_POST_DATA is more
useful but is not always populated without php.ini file changes. The
result is that the default behaviour is to discarded POST'ed data as it is
overwritten with the last value.
It would be preferable to have the following:
$_POST[nonuniquename][0] = "the first occurence";
$_POST[nonuniquename][1] = "the second occurence";
...
$_POST[nonuniquename][n] = "the nth occurence";
instead of:
$_POST[nonuniquename] = "the nth occurence";
--
Edit bug report at http://bugs.php.net/?id=24344&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=24344&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=24344&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24344&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24344&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24344&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24344&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24344&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24344&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24344&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24344&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24344&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24344&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24344&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24344&r=gnused