SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    May 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How get multiple value from url in php?

    hi

    I pass one form with get method in that form I use check box so I want to get all value of checkbox from url in php.

    Quick Reply ...

  2. #2
    SitePoint Mentor bronze trophy
    fretburner's Avatar
    Join Date
    Apr 2013
    Location
    Brazil
    Posts
    1,255
    Mentioned
    32 Post(s)
    Tagged
    4 Thread(s)
    Make sure all the checkboxes have a name attribute like this: name="sports[]" - sports is just an example, but whatever name you choose, make sure it's the same for all the checkboxes, and don't forget to include the square brackets. After the form is submitted, you can use $_GET['sports'] to get an array of all the selected checkbox values.


Tags for this Thread

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
  •