Hi there,
When somebody adds news to the database it appears we have a problem in that when special characters are used:
':@'"}{ etc etc it takes it as MySQL coding, or at least that's what it appears to be doing.
Here's the error the latest post somebody made got:
You have an error in your SQL syntax near 'd say that the new site is nearly complete now, the sections code is done along ' at line 1
So presumably this is something to do with the layout of the database or the way I've coded it.
The database for "body" is layed out as 'text, full text, not null'.
And the query is as follows:
$sql = mysql_query("INSERT INTO news (title,body,date,postby) values ('" . $newstitle . "','" . $newsbody . "',now(),'" . $username . "')")
or die(mysql_error());
Any ideas?
If you wondered, I used the '" . $ . "' because I wondered whether that prevented this but it doesn't so if anybody would be kind enough to explain what they're for I'd be grateful.
Thanks,
Chris