I have two newbie-type questions about deleting records. First of all, I tried to put together the following script but I can't get it to work. Any ideas what the problem is?
<?
$id=$_GET['id'];
$username="xxxxx";
$password="xxxxx";
$database="xxxxx";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$result = mysql_query("DELETE FROM play WHERE id='$ud_id'") or die(mysql_error());
echo $query;
echo "Record Deleted";
mysql_close();
?>
Secondly, is there a way to ask if the person is sure they want to delete the record and then have them click yes or no without writing a whole separate page? I see this often enough on the web that you would think it would be pretty easy.
Daniel