Here's another idea. Create a posted array to delete. I assume $P in your below post is unique? If so, this should work for you...
<form method="post" action="delete.php" >
...........................
while loop...to create dynamic check boxes
<input type="checkbox" name="del[]" value="<?php echo $P;?>"><?php echo $P;?><br />
This create an array called del to delete. You set the values to delete by using the value attribute in the checkbox. Then on the next page, just do this:
foreach($_POST['del'] as $del ) {
$sql = "DELETE FROM Part WHERE P='".$del."'";
mysql_query($sql);
}