Hello, I'm using "stripslashes" before I'm printing the data, from the DB, to screen. The reason is because my users may input words like Mike's phone and in the DB it's save as Mike\'s phone (because I'm also use "mysql_real_escape_string" when I'm input the data in the DB) , so function "stripslashes()" actually fix it. Am I doing worng for using "stripslashes" and not "htmlspecialchars" ?
if you are using mysql_real_escape_string before inputting data to the DB then stripslashes is enough.
if you are using mysql_real_escape_string while inserting data then you must have to remove the inserted slashes, so stripslashes will definitely work for you.