SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Check box form

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Check box form

    Hi

    I have a form with a few check boxes where the value is populated from the database e.g

    <code>
    <input type="checkbox" name="multiple" value="& productsRs("productCode") &" />
    </code>

    I have say around five of these. I obtain the values of the checkboxes like this:

    <code>
    Dim Item

    For Each Item In Request.QueryString("multiple")
    Response.Write Item & " "
    Next
    </code>

    The page will then display all the values of the checkboxes.

    The part I am stuck on is how do I separate the values of each checkboxes into session variables after the for each statement e.g:

    checkbox value1 = session("1")
    checkbox value2 = session("2")
    checkbox value3 = session("3")
    checkbox value4 = session("4")

    Any suggestions please?

  2. #2
    SitePoint Zealot gidday's Avatar
    Join Date
    Jan 2007
    Posts
    190
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi robert475

    You want to split the incoming querystring into an array. Check out

    http://w3schools.com/vbscript/func_split.asp
    Joe
    "All that is necessary for the triumph of evil
    is that good men do nothing."

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by gidday View Post
    Hi robert475

    You want to split the incoming querystring into an array. Check out

    http://w3schools.com/vbscript/func_split.asp
    Thanks for your help!

Bookmarks

Posting Permissions

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