Well, usually it's the other way around. Check the box to delete it, but one way would go like this:
You have a bunch of values in your database in which you are creating the checkboxes with:
<form name="delete" action="nextpage.php" method="post">
<?php
$sql = "SELECT field FROM table";
$res = mysql_query($sql);
while($row=mysql_fetch_array($res)) {
?>
<input type="checkbox" name="checks[]" value="<?php echo $row['field']; ?>" checked>
<?php
}
?>
Something like that. It will bring up what's in the field in the database, create a checkbox for each one, already checked. These checkboxes will be in an array when passed to the next page. The next page, your delete query would look like this:
if(isset($_POST['checks']) && is_array($_POST['checks'])) {
// making sure something was passed
$sql = "DELETE FROM table WHERE field NOT IN ('".implode("','",$_POST['checks'])."')";
}
else {
// nothing was checked, guess you want to delete everything...
$sql = "DELETE FROM table";
}
mysql_query($sql);
This is a crude example I just scratched together, but should lead you in the right direction.