SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    will code HTML for food Michel V's Avatar
    Join Date
    Sep 2000
    Location
    Corsica
    Posts
    552
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php+forms : multiple checkboxes

    I'm thinking of a script that would display a list of items, and next to these items there would be a checkbox. It would be possible to select several items and click on a form button to batch delete them, update them, etc

    Now I'm wondering, how would PHP treat that form value ? As an array ?
    If yes can I still use something like name="multiplechoices" or should I use something like name="multiplechoices[]" ? I'm confused...
    [blogger: zengun] [blogware contributor: wordpress]

  2. #2
    SitePoint Addict
    Join Date
    Apr 2001
    Location
    None
    Posts
    254
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd use name="something[]".
    That's the way I treated my multiple check boxes and they worked great.


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
  •