I\'m trying to store a String which contains HTML in a MySQL database using Longtext data type. But it always says \"You have an error in your SQL
String
Longtext
Try using mysql_real_escape_string function on the string you want to store. It is the easiest way.
mysql_real_escape_string