I have a form that you can enter a subject and then a story.
if you enter anything in the text boxes that has a single quote, when it posts that info from the db it puts a slash infront of it.
Anyone know how to fix?
Replacing single quotes from text box to db
Moderator: General Moderators
Re: Replacing single quotes from text box to db
Take a look at
mysql_real_escape_string() - before inserting into DB.
stripslashes() - when outputing to HTML.
mysql_real_escape_string() - before inserting into DB.
stripslashes() - when outputing to HTML.
There are 10 types of people in this world, those who understand binary and those who don't
Re: Replacing single quotes from text box to db
Thank you very much!