Php responder with remove id

Hi Folks.
Im hoping that somebody could share their knowledge with me please. I have a database whcih collects the email address and name from a flash form. Im having no problem inserting this into my database :wink:

I am trying to set up a responder which will pull the unique ID out from my databse soas to give the subscribe the option to ‘opt out’ as it were.

This is where i seem to be coming unstuck. I can post my code that i have been playing with so far.


<?php
	 //Capture data from $_POST array
	 $name = $_POST['name'];
	 $email = $_POST['email'];
//$date = date("Y-m-d G:i:s") ;
$tz = 5; 
$hour = date("g"); 
$time = date(":i"); 
$daytime = date("A"); 
$hour = $hour + $tz; 
$realTime = $hour.$time.$daytime; 
 
$date = date('l, d. F Y'); //Output: Wednesday, 07. September 2005
	 //Connection to database
	 $connect = mysql_connect("xxx", "xxx", "xxx");
	 mysql_select_db ("bevayne_email", $connect);
	 //Perform the query
	 $result = mysql_query("INSERT into myList (name,email, date) values ('$name','$email','$date $realTime')");
	 if($result) { 
echo "writing=Ok&";
}
	 else echo "writing=Error";
?> 
// this is here just for my testing purposes 
 
<? 
$to = "$email"; 
$subject = "Bevaybe News letter"; 
$message .= "Email: $email 
"; 
$message .= "$name Thanks you for your interest.  Please remove yourself via this link<br/><a href=\"http://www.bevayne.co.uk/scripts/delete.php?id=$id\" title=\"Delete Email Address\">Remove Me Please</a>"; 
$header = "From: [email protected]"; 
mail($to, $subject, $message, $header);
?> 

Thanks in advance