Jump to content

mysql_real_escape_string


owner

Recommended Posts

Hello,

 

I was using mysql_real_escape_string to filter out some of the data being put into the database, and I was able to submit html at first, and everything was working great (or I thought lol).  Then suddenly, I wasn't able to submit html, and every time i have the word don't or something like that, I was getting the \ on all of the '  So, now that mysql_real_escape_string is actually working, how do I allow some of my html, and let words that use ' and are legit to go through?

 

Thanks in advance,

-Owner

Link to comment
https://forums.phpfreaks.com/topic/116352-mysql_real_escape_string/
Share on other sites

mysql_real_escape_string will have no effect on preventing html, I'm a little lost as to what your question/problem actually is.

 

Also, note that if you are getting backslashes saved in your database after applying mysql_real_escape_strring it would appear that you have magic_quotes_gpc enabled. Make sure to use stripslashes prior to mysql_real_escape_string, the backslashes should not actually be getting saved to your database.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.