Mysql throw error when there are special characters in query !, The characters like “`” etc are always a nuisance in sql queries.
For this reason , it’s always a necessity to use mysql_real_escape_string() (www.php.net/mysql_real_escape_string) ! , On one hand it’s secure and make sure that the queries don’t die while executing.
The syntax that should be used for mysql_real_escape_string are :-
<?php
$string = mysql_real_escape_string ($string);
?>
Hope it helps !…..