From:             [EMAIL PROTECTED] 
Operating system: All
PHP version:      4.1.2
PHP Bug Type:     Feature/Change Request
Bug description:  GET/POST-vars does not work according to standards

According to (X)HTML standards you are allowed to have more than one
variable with the same name in a form. One example of this is a listbox
where the user can select multiple items.

The common solution to this is to use "[]" after the name of the variable
so that PHP treats it as an array. Ex: <select name="foo[]">

According to the standards, these characters are not allowed in the name.
It is unlikely, but not probable, that you may risk incompatibillity
problems with some browsers. Even though most browsers accepts it, I think
PHP should follow the standards.

One solution:
I haven't seen the source code, so this may be more complicated to fix
than I think. When parsing the data from the request there should be a
check in the code that checks if it has recieved a variable with the same
name. If so, it should change the original variable to an array and add
the new variable in that array.
-- 
Edit bug report at http://bugs.php.net/?id=16195&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16195&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16195&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16195&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16195&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16195&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16195&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16195&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16195&r=submittedtwice

Reply via email to