Can someone shed some light on the differences between these 2 functions, from the PHP manual:
addslashes
:
Returns a string with backslashes before characters that need to be quoted in database queries etc. These characters are single quote ('), double quote ("), backslash () and NUL (the NULL byte).
mysql_real_escape_string
:
mysql_real_escape_string()
calls MySQL's library function mysql_real_escape_string
, which prepends backslashes to the following characters: \x00, \n, \r, , ', " and \x1a.
From what I gather the major difference is \x00, \n \r \x1a which addslashes
doesn't escape, can you tell me what the significance of that is?