dropfaith Posted October 23, 2008 Share Posted October 23, 2008 from user input i want to remove all single and double qoutes on input $Name = mysql_real_escape_string(trim(stripslashes($_POST['Name']))); on output $Name = mysql_escape_string(trim(htmlentities($_GET['Name']))); but no ive decided to just remove all the qoutes right on input unless you guys have an easier solution on this as it is now if a user inserts a qoute in the movie string it just ends it and then wont link to the article properly http://lawrenceguide.org/film/profile.php?MovieName=Prozac%20Nation Link to comment https://forums.phpfreaks.com/topic/129786-remove-quotes/ Share on other sites More sharing options...
trq Posted October 23, 2008 Share Posted October 23, 2008 mysql_real_escape_string() will not remove quotes. It escapes them. What is your question exactly? Link to comment https://forums.phpfreaks.com/topic/129786-remove-quotes/#findComment-672842 Share on other sites More sharing options...
dropfaith Posted October 23, 2008 Author Share Posted October 23, 2008 i know mysql escape escapes them thats the system i run thru now but now i want to just remove them say user inputs this into the name field Allison's Supreme Chocolate Chip Cookies i want something that turns it into Allisons Supreme Chocolate Chip Cookies So i can use the name to link to it like below Double qoutes currently end the link completly and single quotes just mess it up in the linking http://lawrenceguide.org/recipes/profile.php?Name=Allisons Supreme Chocolate Chip Cookies Link to comment https://forums.phpfreaks.com/topic/129786-remove-quotes/#findComment-672851 Share on other sites More sharing options...
dropfaith Posted October 23, 2008 Author Share Posted October 23, 2008 the major issues are double qoutes in the name field Allison's Supreme Chocolate Chip "Cookies will completly trash the linking system im using Link to comment https://forums.phpfreaks.com/topic/129786-remove-quotes/#findComment-672854 Share on other sites More sharing options...
trq Posted October 23, 2008 Share Posted October 23, 2008 So use str_replace(). Or netter still url_encode(). Link to comment https://forums.phpfreaks.com/topic/129786-remove-quotes/#findComment-672858 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.