Here is one way of doing it....
On your admin script, before you are printing the guestbook entries, add this function:
function killnasty($id)
{
$link = mysql_connect("localhost","username","password") or die(mysql_error());
mysql_select_db("database",$link) or die(mysql_error());
$query="DELETE from table WHERE id = $id";
mysql_query($query) or die(mysql_error());
}
if( isset($delete))
{
killnasty($delete);
echo "The nasty entry was removed.";
return $query;
mysql_close();
}
Make the necessary changes to the above function.
Then, after the printed guestbook entries, you add the following (so that every entry has this appended to it - it'll be part of your while loop):
<a href='{$_SERVER['PHP_SELF']}?delete=id'><img src='delete.gif' border='0'></a>
Obviously, you can customize it at will. That's one way - no doubt there are better ways, but I know this does work as I have used it myself.