Hjælp til sletning af id fra side
Hej eksperter.Kan i se hvorfor den ik vil slette id'et når jeg trykker på billedet..
<?php
if(isset($_GET['slet']))
{
mysql_query("DELETE FROM db_kontakt WHERE id='". $_GET["id"] ."'");
header("Location:kontakt_valg.php");
}
require "db.php";
$id = $_GET['id'];
$query = mysql_query("SELECT * FROM db_kontakt WHERE id='$id'");
$row = mysql_fetch_array($query); {
$navn = $row['navn'];
$email = $row['email'];
$tlf = $row['tlf'];
$firma = $row['firma'];
$dato = $row['dato'];
$emne = $row['emne'];
$besked = $row['besked'];
$id = $row['id'];
echo "<table cellspacing=\"5\" border=\"0\" align=\"center\" width=\"100%\" cellpadding=\"5\" height=\"457\">
<tr>
<td width=\"100%\" valign=\"top\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td width=\"17%\" bgcolor=\"#ded7c7\" class=\"style4\">Navn:</td>
<td width=0 bgcolor=\"#ded7c7\" class=\"style2\">$navn</td>
<td width=0 bgcolor=\"#ded7c7\" class=\"style2\" align=\"right\"><a href=\"?slet=$id\"><img src=\"../images/slet.gif\" border=\"0\"></td>
</tr>
<tr>
<td class=\"style4\">E-Mail:</td>
<td colspan=\"2\" class=\"style2\"><a href=\"mailto:$email\">$email</a></td>
</tr>
<tr>
<td bgcolor=\"#ded7c7\" class=\"style4\">Telefon:</td>
<td colspan=\"2\" bgcolor=\"#ded7c7\" class=\"style2\">$tlf</td>
</tr>
<tr>
<td class=\"style4\">Firma:</td>
<td colspan=\"2\" class=\"style2\">$firma</td>
</tr>
<tr>
<td bgcolor=\"#ded7c7\" class=\"style4\">Dato:</td>
<td colspan=\"2\" bgcolor=\"#ded7c7\" class=\"style2\">$dato</td>
</tr>
<tr>
<td class=\"style4\">Emne:</td>
<td colspan=\"2\" class=\"style2\">$emne</td>
</tr>
<tr>
<td class=\"style4\"> </td>
<td colspan=\"2\" class=\"style2\"> </td>
</tr>
<tr>
<td valign=\"top\" bgcolor=\"#ded7c7\" class=\"style4\">Besked:</td>
<td colspan=\"2\" valign=\"top\" bgcolor=\"#ded7c7\" class=\"style2\">$besked</td>
</tr>
</table></td>
</tr>
</table>";
}
?>