SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  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
    Community Advisor bronze trophy
    fretburner's Avatar
    Join Date
    Apr 2013
    Location
    Brazil
    Posts
    1,438
    Mentioned
    45 Post(s)
    Tagged
    13 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
  •