Reading Multiple Checkboxes

Discussion in 'PHP' started by cro91, Sep 29, 2011.

  1. #1
    Never mind 70 views and no answers :( I will figure it out on my own.
     
    Solved! View solution.
    Last edited: Sep 29, 2011
    cro91, Sep 29, 2011 IP
  2. blueparukia

    blueparukia Well-Known Member

    Messages:
    1,564
    Likes Received:
    71
    Best Answers:
    7
    Trophy Points:
    160
    #2
    This is eay enough if its what I think you want, no need to remove the question its only be a day and a half.
     
    blueparukia, Sep 30, 2011 IP
  3. #3
    If you're asking what I think, something along the lines of:

    <form method="post">
    <input type="checkbox" name="option[]" value="Option 1" /> Option 1<br />
    <input type="checkbox" name="option[]" value="Option 2" /> Option 2<br />
    <input type="checkbox" name="option[]" value="Option 3" /> Option 3<br />
    <input type="checkbox" name="option[]" value="Option 4" /> Option 4<br />
    <input type="submit" value="Submit" />
    </form>
    
    HTML:
    Then $_POST['option'] should be an array with the user's selections.
     
    Alex Roxon, Sep 30, 2011 IP
  4. cro91

    cro91 Peon

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks for the reply. I already found this out and was using it :p
     
    cro91, Sep 30, 2011 IP