I mean, the input will be stored in the db like \'
It wont. It will be stored as '
Besides, you should not be using addslashes() at all, but rather should have magic_quotes_gpc off and then use the appropriate escaping mechanism, e.g., mysql_real_escape_string(), or better yet, prepared statements.