function delete_links($table)
{
extract($_REQUEST);
if( !isset($checkboxes) || !isset($deleteconfirm)) return; //nothing was checked, or delete not confirmed
$ids=implode(",",$checkboxes);
global $db;
$query="DELETE From $table WHERE id IN ($ids)";
$db->query($query) OR $db->death();
echo "Deleted ".$db->affected_rows()." items<br>";
}
Here the checkboxes are all called the same thing and generated from a database so you'd have
<input type="checkbox" name="checkboxes[]" value="242">
<input type="checkbox" name="checkboxes[]" value="6136">
<input type="checkbox" name="checkboxes[]" value="818">
in the actual generated page. $db->query() is just a wrapper around the actual php mysql commands in case you don't do that