checkbox confusion

Discussion in 'HTML' started by Jeff Thies, Jul 22, 2003.

  1. Jeff Thies

    Jeff Thies Guest

    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
     
    Jeff Thies, Jul 22, 2003
    #1
    1. Advertising

  2. Jeff Thies

    Igor Slyusar Guest

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

    > 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.

    Regards, Igor Slyusar.
    http://www.slyusar.com
     
    Igor Slyusar, Jul 22, 2003
    #2
    1. Advertising

  3. Igor Slyusar wrote:
    > On Tue, 22 Jul 2003 21:02:43 GMT, Jeff Thies
    > <> wrote:
    >
    >
    >> 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[].
     
    Leif K-Brooks, Jul 22, 2003
    #3
  4. Igor Slyusar <> wrote:

    >> 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.


    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.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Jul 22, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad
    Replies:
    0
    Views:
    528
    tshad
    Apr 15, 2005
  2. Vikram

    disable checkbox list checkbox

    Vikram, Jan 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,403
    ThunderMusic
    Jan 25, 2006
  3. =?Utf-8?B?RG90TmV0RGV2?=

    DataGrid and embeded Checkbox..How to find if checkbox clicked

    =?Utf-8?B?RG90TmV0RGV2?=, Oct 6, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    828
    David Wier
    Oct 6, 2006
  4. Jason Huang
    Replies:
    0
    Views:
    557
    Jason Huang
    Jun 29, 2007
  5. Mark Anderson

    checkbox.length confusion

    Mark Anderson, Oct 21, 2003, in forum: Javascript
    Replies:
    6
    Views:
    102
    Mark Anderson
    Oct 22, 2003
Loading...

Share This Page