I'm currently almost done with a new site of mine, but one MySQL insert query is giving me trouble.
The error message I am receiving is : 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 '' at line 2
The code is:
mysql_query("INSERT INTO Conversations (IP_Address, Question, Answer) VALUES ('$ip', '$storedquestion', '$answer'")or die(mysql_error());
The problem is with the string $answer to my knowledge. It does contains apostrophes and such, but I couldn't get it to change with the real escape string function.