0

I have all my inputs from the user (that end up in a mysql table) go through mysql_real_escape_string() per php.net and most forum users. I honestly don't know what it does internally.

What I do know is that running on my xampp light installation it does not effect the user input, but when I upload to my production Linux server it adds a '\' to the user input whenever the user uses an apostrophe such that It's becomes It\'s.

What is the fix for this?

alex
492k205 gold badges890 silver badges992 bronze badges
asked Aug 12, 2011 at 4:35
2
  • Please show us the code. Commented Aug 12, 2011 at 4:36
  • I'll do it and I might add that magic quotes is a good name. Commented Aug 12, 2011 at 4:40

1 Answer 1

4

You have magic_quotes enabled on your remote server. Disable it.

answered Aug 12, 2011 at 4:37
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.