I have a page of PHP code to generate a table and to process some delete functions:
for ($col=0; $col<=$this->columns; $col++)
{
echo "<TD>";
if($col<$this->columns)
{
echo pg_fetch_result ($result, $row, $col);
//company name is the unique key
if($col==1)
$companyArray[$row]=pg_fetch_result($result, $row, $col);
}
$deleteCompanyName=$companyArray[$row];//$deleteCompanyName holds the Company Name to be deleted
/******This is the portion that I have a problem******/
if($col==$this->columns)
echo "<a href='webpurchase1.php?sort=delete&rownum=$deleteCompanyName'>DELETE ABOVE PRODUCT</a> ";
/**********End of portion **********************/
echo "</TD>\n";
}
I would like to replace
echo "<a href='webpurchase1.php?sort=delete&rownum=$deleteCompanyName'>DELETE ABOVE PRODUCT</a> ";
with
<INPUT TYPE="Checkbox" Name=checkbox2 Value=$checked >
so that when I click on the box and when I push a delete button, I can delete all the rows that have been checked.
How can I do that?
Thanks