I'm moving an HTML form from development (localhost) to production and initial testing has identified a problem with escape characters appearing in the production MySQL database that dont appear in the localhost database.
I'm using mysql_real_escape_string
to escape characters in the form processing file and in the localhost database these are saved correctly and all you see is the apostrophe or quote symbol.
Once moved to production however, the form still processes correctly, but the database record now has the backslash escape character in front of the apostrophe or quote symbol. When the record is printed the backlash appears and this won't be acceptable.
Nothing else appears to be different, except localhost and production are running different versions of MySQL (localhost is running 5.5.24-log and production is running 5.0.95-log). I have no control over the production version as it is managed by the ISP, so I'm hoping this isn't the problem.
Hopefully this makes sense? Any help greatly appreciated.