Hello all
I have the following PHP script to place records from my MySql db into a
table. However I now wish users to beable to select the multiple records
from the table and on clicking a button the selected records are stored to
another table in my db. I have started by including a check box in the first
column but dont know the code necessary to check all the row in the table
and copy the records of those boxes thats ticked
Can anyone help?
Thanks
Ian
*************** *************** ***********
<table width="1022" border="2" align="left" cellpadding="0" cellspacing="0" >
<tr>
<td width="48"><div align="left"><s pan
class="style2"> Select</span></div></td>
<td width="91"><spa n class="style2"> Question No </span></td>
<td width="527"><sp an class="style2"> Question</span></td>
<td width="42">path </td>
<td width="42"><spa n class="style2"> Type</span></td>
<td width="256"><sp an class="style2"> Image</span></td>
</tr>
<tr>
<?php
while($row =& mysql_fetch_ass oc($result)) {
extract($row);
if ($i%2) {
$class = 'row1';
} else {
$class = 'row2';
}
$i += 1;
if ($ImagePath) {
//$Image = WEB_ROOT . 'images/PupilTester/' . $ImagePath;
$Image = 'images/PupilTester/' . $ImagePath;
} else {
$Image ='images/PupilTester/nopicture.bmp';
}
?>
?>
<tr class="<?php echo $class; ?>">
<td>
<div align="center">
<input type="checkbox" name="checkbox" value="checkbox ">
</div></td>
<td><?php echo $QuestionNo; ?> </td>
<td><?php echo $Question; ?></td>
<td><?php echo $ImagePath; ?></td>
<td><?php echo $TypeID; ?> <div align="center"> </div></td>
<td><img src=<?php echo $Image; ?>></td>
</tr>
<?php
*************** *************** *******