+ Post New Thread
Results 1 to 2 of 2
Web Development Thread, Checkboxes in Coding and Web Development; Hi All, Happy New Year. Does anyone know how to sent which checkboxes are ticked to another page? I've got ...
  1. #1
    Devontechie's Avatar
    Join Date
    Nov 2007
    Location
    UK
    Posts
    896
    Thank Post
    181
    Thanked 200 Times in 163 Posts
    Rep Power
    71

    Checkboxes

    Hi All,

    Happy New Year.

    Does anyone know how to sent which checkboxes are ticked to another page? I've got a form set up which a few tick boxes that I need sent onto the next page which then sends the email.

    Cheers,
    Steve

  2. #2

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,406
    Thank Post
    640
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    324
    HTML form:

    Code:
    <input type="checkbox" name="names[]" value="tom" /> Tom
    <input type="checkbox" name="names[]" value="dick" /> Dick
    <input type="checkbox" name="names[]" value="harry" /> Harry
    In the PHP script, $_POST['names'] will be an array containing the values of the checked boxes. E.g. if you tick tom and harry, then you will end up with an array that has two elements, with values of 'tom' and 'harry'.

SHARE:
+ Post New Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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