View Single Post
Old 02-28-2010, 08:09 PM   #8 (permalink)
Rhinos
The Wanderer
 
Join Date: Aug 2009
Posts: 17
Thanks: 0
Rhinos is on a distinguished road
Default

For the line where you output the checkbox you need to make the following changes

PHP Code:
      $output .= "<input type = 'checkbox'
                         name = 'checkbox[]'
                           id = 'checkbox_
$aRecords[sid]'
                        value = '
$aRecords[sid]' />"
the id attribute is mainly used in DOM manipulation with javascript. You need to set the value attribute to the ID of the record.
You also did not properly close the <input> tag as you missed out the closing />

When the form is submitted now you should be able to do a var_dump($_POST['checkbox']). If it is empty it's because you didn't check any of the boxes. So try checking a few boxes and then it should give you an array with the IDs of those records that you selected.
Rhinos is offline  
Reply With Quote