Forum Moderators: coopster

Message Too Old, No Replies

Input name and id different: passing both

My checkboxes name and id have to be different and I need to pass both...

         

AndieR

1:10 pm on Sep 12, 2005 (gmt 0)

10+ Year Member



Hello!

In my form I have multiple checkboxes which need to have an id and a name with different values. I used to pass and save this form with the name and it worked fine but now I need the name for a javascript on the form page and I would like to pass my php variable though the ID... Is this at all possible and how can I do it?

<input type='checkbox' id=tagsid[] name=$item value=$item checked>

Any help really appreciated!

Regards,
Andrea

dcrombie

3:40 pm on Sep 12, 2005 (gmt 0)



Have you tried validating [validator.w3.org] your form? I don't thing that's a valid value for id - especially if you have more than one. The values passed by PHP will always be from the name attribute.