Bug #11985 Updated: BUG with parse_str
| From: | brianlmoon@php.net | Date: | Tue, 10 Jul 2001 15:51:40 +0000 |
| Subject: | Bug #11985 Updated: BUG with parse_str | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-59564@lists.php.net to get a copy of this message | ||
ID: 11985
Updated by: brianlmoon
Reported By: benoit_cardon@yahoo.fr
Old Status: Feedback
Status: Bogus
Bug Type: URL related
Operating System: SOLARIS 2.8
PHP Version: 4.0.6
New Comment:
The user was using parse_str on $QUERY_STRING which caused the $delete array to have 4 entries.
Brian.
Previous Comments:
------------------------------------------------------------------------
[2001-07-09 14:37:55] brianlmoon@php.net
Perhaps showing us the complete script and output would help. With what you have here, I can make
no sense of your problem. That URL could not have been generated by that form as there are no [] in
it.
Thanks,
Brian.
------------------------------------------------------------------------
[2001-07-09 13:17:46] benoit_cardon@yahoo.fr
It seems to be a mistake with the function parse_str() applyed to $QUERY_STRING.
URL: http://mycomputer/myscript?delete=10&delete=12
HTML CODE:
<Input type="checkbox" name=delete[] value=10>
<Input type="checkbox" name=delete[] value=12>
And (not the winner is :-) ) parse_str($QUERY_STRING) returns in the environment an array $delete
with a size of 4 (instead of 2) !! Some programmer forget to divide a result by 2, or there is
something I forget ?
(TEST : $i=0; while (isset($delete)) { print "$delete[$i]\n"; $i++ } ... I obtain 4
writings with this test (i wanted not use the sizeof function for my test)).
Regards
------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11985&edit=1