Here's a very basic example
Put this at the top of your page before you query from the database
if ( isset($_POST['Submit']) ) {
foreach ($_POST['did'] as $did) {
mysql_query("DELETE FROM xxxxx WHERE id = $did");
}
}
When you're printing your database records, use the the array brackets in HTML "[]" for the checkbox value. This tells PHP to treat multiple values for that name as an array in the $_POST superglobal.
print "<INPUT TYPE=\"checkbox\" NAME=\"did[]\" VALUE=\"{$row['id']}\">{$row['name']}\n";
If you wanted the "yes" "no" dialogue for each you could build out a form with hidden fields again where I have used a DELETE query. However, I would make it simple and just do
print"<INPUT TYPE=\"submit\" NAME=\"Submit\" VALUE=\"Submit\" ONCLICK=\"return confirm('Are you sure you want to delete selected records?')\">\n";
and make use of ultra simple javascript.