Jump to content

Small problem


miligraf

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.