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? ??? Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
jitesh Posted March 21, 2007 Share Posted March 21, 2007 echo stipslashes("we\'ll"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.