I need to be able to change the code below so that it displays a checkbox instead of a detail button, and for each checked box, output a page with selected information from each record to a printer, basically generating a letter for each selected entry in the db.
I'm afraid I don't know enough about the <td class=""> to do change it to a checkbox....
I am working on the printable letter, but do not know how to get it to process and automatically print the records....
Any help is greatly appreciated.
Rob
<?php
if($all_rows){ // not empty array(some key=>value)
foreach($all_rows as $row){
echo '<td class="btn"><a href="a_detail.php?recnum='.$row['recnum'].'"><img src="style/detail.gif" alt="Detail"/></a></td>';
echo '<td>'.$row['lastname'].'</td>';
echo '<td>'.$row['firstname'].'</td>';
echo '<td>'.$row['sex'].'</td>';
echo '<td>'.$row['dob'].'</td>';
echo '<td>'.$row['warstatus'].'</td>';
echo '<td >','</td>';
echo '</tr>';
}
}
else{ // $all_rows is empty array(), no results
echo '<tr>';
echo '<td colspan="9">No records found.</td>';
echo '</tr>';
}
?>