i rely on the mysql_real_escape_string function to prepare my form input for use with sql statements. it's worked well for me before but i've just hit a problem with it on one new host server. if my form input has a " character in it, using mysql_real_escape_string should put a \ escape character in front of the " character. however, on this host server, it seems to add 2 \ characters (i.e. \\) in front of the " character. anyone seen this behaviour before? is there something i can do? is it a setting on the server? thanks in advance for your help.
i've doen scripting for different versions of php on different servers... so far i've never seen this before...
ive seen it before, the new host has different version of php that is set by default to escape data before it goes into mysql (ALL NEW VERSIONS OF PHP DO THIS!)
thanks for the responses... i dug around and found out that there's this setting for 'magic quotes' in php... so what i have to do is to check if this setting is turned on or not... if it's off, i have to call "mysql_real_escape_string"... you learn something new everyday...