miligraf Posted March 21, 2007 Share Posted March 21, 2007 I have a site with a database, people add their stuff so i can review it and post it on the site the problem is this: They submit any text with ', like: we'll and i see it like this: we\'ll but when i load the file to edit it, i see it like it should be: we'll Whats the problem? ??? Link to comment https://forums.phpfreaks.com/topic/43611-small-problem/ Share on other sites More sharing options...
btherl Posted March 21, 2007 Share Posted March 21, 2007 Try doing the following to all your input: $var_stripped = stripslashes($_REQUEST['var']); $var_esc = mysql_real_escape_string($var_stripped); Then use $var_esc in your mysql query. With any luck, it'll pop out the other end in the way you want it to If it doesn't, try printing out the variable at every stage of processing, to see where the processing goes wrong. Link to comment https://forums.phpfreaks.com/topic/43611-small-problem/#findComment-211780 Share on other sites More sharing options...
jitesh Posted March 21, 2007 Share Posted March 21, 2007 echo stipslashes("we\'ll"); Link to comment https://forums.phpfreaks.com/topic/43611-small-problem/#findComment-211799 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.