The addslashes () function is used to add backslashes into your data before quotes or double quotes. If you are allowing users to store information in your database it is a good idea to use addslashes to prevent them from being able to use quotes to end your code and insert their own. Read more.


I thought with the invention of PDO and prepared statement, addslashes() have become obsolete?