You could set up your delete links for each record along the lines of this demo.
As you loop through your db records, you create a 'delete' link for each record for each record id.
Normally you would use check boxes for each record so you can delete multiple records in one go, but probably best to keep it simple for now.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title></title>
<style type="text/css"></style>
<script type="text/javascript">
function deleteRecord(recID){
var ans = window.confirm('Are you sure you want to delete record '+recID);
if(ans == true){
window.location.href='delRecord.php?id='+recID;
}
}
</script>
</head>
<body>
<?php
$id = 'qw1'; //this line is just for testing purposes
// this echo would be in your loop
echo '<a href="" onclick="deleteRecord('."'" . $id . "'" .');return false;">Delete</a>';
?>
</body>
</html>