Now when I submit the character \' I get the following error listed below other then that everything is okay when I submit words. I am using htmlentities()
\'
htmlentities()
put your SQL query into a variable e.g.
$query = "SELECT * FROM table WHERE field= ".mysql_real_escape_string($var).""; echo $query; $result = mysql_query($query);
you can then inspect what is actually sent to mysql as the query