checkbox confusion

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
  I have a list of checkboxes that all have the same name:

<INPUT TYPE=CHECKBOX VALUE="1" NAME="user_attr64">one<BR>
   <INPUT TYPE=CHECKBOX VALUE="2" NAME="user_attr64">two<BR>
   <INPUT TYPE=CHECKBOX VALUE="3" NAME="user_attr64">three<BR>

I didn't write that, that's the format that requires.

I need to do a little preprocessing before that gets sent off, so I have
to collect those values and send them off again (LWP post).

  I only see the value of the first checkbox. How are all these multiple
checkboxes sent off?


Re: checkbox confusion

On Tue, 22 Jul 2003 21:02:43 GMT, Jeff Thies

Quoted text here. Click to load it

As far as I remember they are sent as an array. In your case it's
$user_attr64[0], $user_attr64[1], $user_attr64[2] etc.

Regards, Igor Slyusar.

Re: checkbox confusion

Igor Slyusar wrote:
Quoted text here. Click to load it
1) That's what PHP does.  Other languages may do other things.
2) PHP will only do that if you name the checkboxes user_atrr64[].

Re: checkbox confusion

Quoted text here. Click to load it

Really? Then you need to check your sources.

The checkbox data is sent as name=value pairs. What happens _then_
depends on the server-side script.

Quoted text here. Click to load it

Who knows? We have no information about the programming environment

Yucca, /
Pages about Web authoring:

Site Timeline