zkuste mysql_real_escape_string(). by mělo fungovat! https://php.net/manual/en/function .mysql-real-escape-string.php