+ 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
    909
    Thank Post
    183
    Thanked 204 Times in 166 Posts
    Rep Power
    73

    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,417
    Thank Post
    644
    Thanked 965 Times in 665 Posts
    Blog Entries
    2
    Rep Power
    328
    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
  •