Can someone please help me with this error? I'm still sorta new to this stuff.
I am trying to build a newscript and it works except whenever you try and add a ' into the news posting it won't add the entire post to the db.
it says the error is;
MySQL error 1064: You have an error in your SQL syntax near 'neo', now())' at line 2
(neo is the value for the author variable)
$query = "INSERT INTO news(title, news, author, date)
VALUES('".$_POST['title']."','".$_POST['news']."','".$_POST['author']."', now())";
mysql_query($query);
thanks in advance for any help 🙂