$sql = "UPDATE forum_main SET name='$name', desc='$desc' WHERE ID='$forumid'";
echo $sql."<---<BR><BR>";
if ($result = mysql_query($sql)) { echo "<tr><td>Forum <b>$name</b> has been updated.</td></tr>"; }
else { die(mysql_error()); }
While using the above code I am getting the following error:
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 'desc='Forum 2ff Desc' WHERE ID='2'' at line 1
When I echo $sql I get this:
UPDATE forum_main SET name='Forum 2ff', desc='Forum 2ff Desc' WHERE ID='2'
Any ideas why?
Thanks