Hey, folks --
I have a query that pulls rows from a mysql db. The rows are displayed in a very simple HTML table, with a checkbox in the first row. Each row contains a unique id (character type). There is a form and submit button. The method is POST.
Problem: I cannot get the unique ID into the POST array. Here is my code below. I have spent lots of time on this, but I cannot make it work no matter what I try.
Using print_r(), my $_POST array looks like this after clicking the checkbox for 1 row:
Array
(
[checkbox] => Array
(
[0] =>
)
)
Thanks in advance for any suggestions.
while ( $aRecords = mysql_fetch_array ( $qResult ) )
{
$row_id = $aRecords ["student_id"] ;
$output .= "<tr><td>" ;
$output .= "<input type = 'checkbox'
name = 'checkbox[]'
id = '<?php echo $row_id ; ?>'
value = '' >" ;
$output .= "</td>" ;
for ( $n = 1 ; $n <= ( $fields_num - 1 ) ; $n++ )
{
$output .= "<td>" ;
$output .= $aRecords [ $n ] ;
$output .= "</td>" ;
}
$output .= $aRecords [ $n ] ;
$output .= "</td>\n";
$output .= "</tr>\n" ;
}