Re: CheckBoxes....

From: Date: Sun, 03 Mar 2002 16:15:32 +0000
Subject: Re: CheckBoxes....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-86983@lists.php.net to get a copy of this message
Yes, well, PHP supports that a little bit differently. If you append '[]' to the name, an array will be returned after submit with the values of the checked checkboxes. <INPUT TYPE=TEXT NAME="test[]" VALUE="1" CHECKED> <INPUT TYPE=TEXT NAME="test[]" VALUE="2"> <INPUT TYPE=TEXT NAME="test[]" VALUE="3" CHECKED> (submit..) $test now contains array("1","3"); bvr. Ben Turner wrote:
Don't checkboxes, if you name them all the same name, produce a comma delimited string in php of the values selected??? such as for 15 checkboxes with numeric values would produce a string such as.... ,,,,,,,13,,,,14,,,18 when the form was submited?? This is the way it was handled in ASP... is there something different for PHP? thanks! Ben


« previous php.general (#86983) next »