Your starting page would be:
<?
echo "Select an item(s) to delete\n";
$count_of_items = 5; //this should come from a database query
echo "<form name=\"someItems\" action=\"deleteItems.php\">\n";
echo "<table width=\"100%\" cellpadding=\"10\" border=\"1\">\n";
for ($i=0;$i<$count_of_items;$i++){
echo "<tr><td align=\"right\"><font face=\"Arial\" size=\"2\">";
echo "<input type=\"checkbox\" name=\"delete_item_array[]\" value =\"item$i\"></td>" ;
echo "<td align=\"left\"><font face=\"Arial\" size=\"2\">Item id: " . $i . "</td></tr>\n";
}//end looping through all the items
echo "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"Delete Selected Items\"></td></tr>\n</table>\n</form>";
?>
After you upload that page... view it in html and look at the source code. There is an array of checkboxes.
Then the page to process the checkboxes would be something like this:
<?
if((isset($delete_item_array)) && (is_array($delete_item_array))){
$cnt_of_items_to_delete = count($delete_item_array);
echo "You have selected " . $cnt_of_items_to_delete . " items to delete!<br><br>\n";
for($j =0; $j<$cnt_of_items_to_delete;$j++){
///php code to connect to data base
$sql_statement = "DELETE from ITEMS where Item_id = '" . $delete_item_array[$j] . "'";
echo "\t\tThe SQL Statement is " . $sql_statement . "\n";
///// have your mysql query call here
}
}else{
echo "There was an error processing your selections, or you selected NO items\n";
}
?>
Hope that helps