owner Posted July 24, 2008 Share Posted July 24, 2008 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 More sharing options...
trq Posted July 24, 2008 Share Posted July 24, 2008 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. Link to comment https://forums.phpfreaks.com/topic/116352-mysql_real_escape_string/#findComment-598274 Share on other sites More sharing options...
owner Posted July 24, 2008 Author Share Posted July 24, 2008 well, on my site I have been using mysql_real_escape_string to filter all of my data. but recently something happened, and if I use mysql_real_escape_string it wont let me add my html. and I have no idea what would trigger this to not work anymore lol Link to comment https://forums.phpfreaks.com/topic/116352-mysql_real_escape_string/#findComment-598278 Share on other sites More sharing options...
owner Posted July 24, 2008 Author Share Posted July 24, 2008 turned out to be an error with either the session or the cache. Restarted the browser and it works again lol Link to comment https://forums.phpfreaks.com/topic/116352-mysql_real_escape_string/#findComment-598289 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.