Delete MySQL row using PHP

dudes, can you help me figure out how to delete a MySQL record in PHP???

i know the output should read:
delete.php?id=9

i thought this would nail it but no luck:


<a href="delete.php?id=<? echo "$id"; ?>">delete</a>

and heres the delete.php:


<?
include("dbinfo.inc.php");
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query=" DELETE * FROM contacts WHERE id='$id'";
 
mysql_close();
?>
deleted!