What does mysql_real_escape_string() do that addslashes() doesn’t?

It adds slashes to:

\x00, \n, \r, \, ', " and \x1a. characters.

Where addslashes only adds slashes to

' \ and NUL

Ilias article is also pretty detailed on its functionality

Leave a Comment