"Christian Dechery" <[EMAIL PROTECTED]> wrote:
> How can I associate a list of checkboxes to a list of texfields?
> but what if have:
> <input type=checkbox name=checklist[]>Cb1 <input type=text ...
> <input type=checkbox name=checklist[]>Cb2 <input type=text ...
>
> how would I associate each textfield to its checkbox? In the same array?
in
> a different one? How??
I would recommend generating these checkbox / text input field combos within
a loop and assign to separate arrays with the same key so you can match them
up when processing later. Like this:
$num_inputs = 5; // if you want 5 sets of checkboxes and text inputs.
for ( $i = 0; $i < $num_inputs; $i++ )
{
echo "<input type=checkbox name=checklist[$i]>Cb $i <input type=text
name=text[$i]>\n";
}
--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]