Page 1 of 1

multiple name/values in one checkbox

Posted: Tue Feb 04, 2003 6:50 pm
by tennis_blues
hi,
i am pretty sure i cant do what i want to do, so i am hoping of a good workaround....i hope you can help!

i want to send multiple names and values from a checkbox

so, for example:
<input type=checkbox name1=FirstName[] value1=Sue name2=LastName[] value2=Jones>
<input type=checkbox name1=FirstName[] value1=Tom name2=LastName value=Johnson>

can someone please point me in the right direction

thanks so much in advance!

Posted: Tue Feb 04, 2003 7:57 pm
by McGruff
I'm not sure exactly what you're asking but this might help:

If you set value = this_that_other, you can pass three VARs. Explode the this_that_other string to get an array with each of the VARs.

Posted: Tue Feb 04, 2003 8:41 pm
by mydimension
no you can't do it because its not part of the (X)HTML specification. a workaround that comes to mind is a multiple select box.

Posted: Tue Feb 04, 2003 8:51 pm
by tennis_blues
thanks both for your help