Results 1 to 2 of 2

Thread: POST data in html form that has checkboxes and radio buttons

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    3

    POST data in html form that has checkboxes and radio buttons

    I can post data to textfields with no problems with this code:
    Code:
    postData = "Name=" & Text1.Text
    
    cURL = "http://somehost.com/form.php"
    
    'Inet1.Execute cURL, "POST", Data, "Content-Type: application/x-www-form-urlencoded"
    How can i post data to a form that has radio buttons and Checkboxes?

  2. #2
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: POST data in html form that has checkboxes and radio buttons

    I am not absolutely sure about the syntax of the tags but I will just give an example.

    On a Forn you have a radio button and let's say it has a name of "rb" and also on this Form there is a checkbox and it has a name of "cb".

    There will be a tag for each of these objects; something like this:

    <input type=checkbox name=cb value=unchecked>
    <input type=radiobutton name=rb value=false>

    (Now, like I said, I am not sure of the above syntax so don't quote me on that exactly as I posted it)

    Now in you POST request you will have a data string that will include something like this:

    .........&rb=true&cb=checked&somethingelse=.......

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width