Bug #1168: parse_str checkbox formular

From: Date: Sun, 21 Feb 1999 15:29:08 +0000
Subject: Bug #1168: parse_str checkbox formular
Groups: php.dev 
Request: Send a blank email to php-dev+get-4187@lists.php.net to get a copy of this message
From: Seife@AOL.COM Operating system: linux PHP version: 3.0.6 PHP Bug Type: Misbehaving function Bug description: parse_str checkbox formular If you try to parse formulardata with checkbuttons, only the last value of a bunch of equally named checkbuttons is returned. eg: <form ...> <input type="checkbox" name="willi" value="first"> <input type="checkbox" name="willi" value="second"> <input type="checkbox" name="willi" value="third"> <input type="checkbox" name="willi" value="fourth"> <... submit ...> </form> If the user checks more than one of the boxes, eg. all of them, $QUERY_STRING holds something like "willi=first&willi=second&willi=third&willi=fourth". Me expected the variable $willi, which is automatically instantiated by parse_str($QUERY_STRING), to be an array like array("first","second","third","fourth"). Instead $willi just holds the value "fourth". PS. I like your approach very much. A lot of things are much easier to do in php3 than in other languages i know. Best wishes, Ralf. -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#4187) next »