addslashes($your_string) - This PHP function returns a string with backslashes in front of each character that needs to be quoted in a database query. This characters that will have the backslash (\) placed in front of it are: single quote ('), double quote ("), backslash (\) and NULL (the NULL byte).
stripslashes($your_string) - This PHP function returns a string with the backslashes (\) removed that were added by the PHP addslashes() function.