GET ile yapsan daha kolay olur
<a href="sil.php?id=1"><img src="sil.gif" /></a>
$id = @$_GET['id'];
if(isset($id)){

//Sil

}else{ 
echo "Hata";
}