Re: retrieve multiple select

From: Date: Mon, 02 Mar 2009 23:59:02 +0000
Subject: Re: retrieve multiple select
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-289103@lists.php.net to get a copy of this message
PJ wrote:
Michael A. Peters wrote:
PJ wrote:
Well, I think 60+ checkboxes get kind of garbagy
I bet it is easier to select the fields you want from 4 columns of 15 checkboxes than from a big long list of 60 in a select. But you might be right. I don't design for a living.
Neither do I; it's rather a question of necessity: "do or die!" :-) But I'm glad you brought this up. Only problem is, I think that the code to gather the 60+ inputs would get long and more complicated than dealing with the multiple input dropdown box. Probably a matter of personal choice. Thanks.
Have not tried it with check boxes but it works with file uploads - <input type="checkbox" name="something[]" value="yourvalue"/> A bunch of those all with something[] and they will all be in same post array variable. Just make sure yourvalue is unique to the checkbox, so you know which checkboxes were selected. I've not tried that, but name="something[]" works with file inputs so that they are all in same post variable as an array.

« previous php.general (#289103) next »