checkbox confusion

J

Jeff Thies

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 mailermailer.com 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?

Jeff
 
L

Leif K-Brooks

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


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.
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[].
 
J

Jukka K. Korpela

Igor Slyusar said:
As far as I remember they are sent as an array.

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.
In your case it's
$user_attr64[0], $user_attr64[1], $user_attr64[2] etc.

Who knows? We have no information about the programming environment
used.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top