Here is my code:
It is supposed to delete an entry from the table users, but it doesn't work. Here is the error I get:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1' at line 1.
And it seems weird, because there is no '1' in my script! Have you any idea what's wrong, because I don't!
Thanks! 
PHP:
<?php $allow = array ('5');include ("/home/thenicow/public_html/m/protect.php"); ?>
<title>Delete User</title>
<?php
$con = mysql_connect("localhost","username","password");
mysql_select_db("database", $con);
$username = $_POST["username"];
if (isset($_POST['delete'])) { //if you hit delete then do the fallowing
$sql = mysql_query("DELETE FROM users SET username = '{$_POST['username']}'");
mysql_query($sql)
or die (mysql_error());
}
?>
It is supposed to delete an entry from the table users, but it doesn't work. Here is the error I get:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1' at line 1.
And it seems weird, because there is no '1' in my script! Have you any idea what's wrong, because I don't!