please can any1 tell me what is the problem with this delete code??
<?php
$con = mysql_connect("localhost","username","pswd");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("dbname", $con);
$val=$_GET['teachers'];
mysql_query("DELETE FROM teacher WHERE title='$val'");
mysql_close($con);
?>