Zeradin Posted September 12, 2008 Share Posted September 12, 2008 I have this to insert a title into a news table: $title = mysql_real_escape_string($_POST['title']); and then I insert it, but when I look at the table if the title was "quotes" the title in the table is still just "quotes" the quotation marks are still there... that wouldn't be a problem, but when I go to mysql_fetch_assoc out of it it doesn't read past the quotes. how do i fix this? Link to comment https://forums.phpfreaks.com/topic/123934-solved-quotes-in-and-out-of-sql/ Share on other sites More sharing options...
The WebCoder Posted September 12, 2008 Share Posted September 12, 2008 That is strange, maybe you have to check your script (maybe you post $_POST['title'] instead of $title). You can also try htmlentities($_POST['title']) as alternative. Link to comment https://forums.phpfreaks.com/topic/123934-solved-quotes-in-and-out-of-sql/#findComment-639832 Share on other sites More sharing options...
Zeradin Posted September 12, 2008 Author Share Posted September 12, 2008 That is strange, maybe you have to check your script (maybe you post $_POST['title'] instead of $title). You can also try htmlentities($_POST['title']) as alternative. htmlentities makes the edit form think the title "quotes" is "quotes"><br /> Link to comment https://forums.phpfreaks.com/topic/123934-solved-quotes-in-and-out-of-sql/#findComment-639841 Share on other sites More sharing options...
Zeradin Posted September 12, 2008 Author Share Posted September 12, 2008 and that led me to find the problem. I'm an idiot. I was missing quote in the "value" Link to comment https://forums.phpfreaks.com/topic/123934-solved-quotes-in-and-out-of-sql/#findComment-639849 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.