$text = "My car's mirror is broken!"; $text2DB = addslashes($text); mysql_query("INSERT INTO ... $text2DB ... // complete the MySQL INSERT INTO action here |
PHP's addslashes() function is enough to solve this problem. It will add slashes when necessary automatically. Isn't that neat?
No comments:
Post a Comment