Hello all,
I am having the following problem with my INSERT INTO code (error generated with mysql_error()):
You have an error in your SQL syntax near 'desc) VALUES ('one', 'two')' at line 1
And here is the code that is causing the error:
$db = mysql_connect("$DOMAIN", "$USER", "$PASS");
mysql_select_db("$USER",$db);
$sql = "INSERT INTO bio_dist (title, desc) VALUES ('$title', '$desc')";
mysql_query($sql);
$title and $desc are passed from a form (I know they are being passed as I have echo-ed them and they show), but even with a string instead of a variable I get the same error! I have no idea what is going wrong as I have used the same INSERT INTO format in other parts of the code which work fine :/
Thanks in advance.
Clint