Hey there
Please can someone explain to me the best of doing this.
I have a form on a website, values get submitted to a database and can contain ' or "
From using phpinfo() I can see that magic_quotes_gpc is set to on and both magic_quotes_runtime and magic_quotes_sybase is set to off.
I therefore assumed that when submitting "I don't like fish" would result the word don't being inserted into the database as don\'t and when displayed on the next page as don't.
However it is entered and displayed as don\\'t.
If I addslashes before submitting the data and stripslashes after selecting the information (Still with magic_quotes_gpc set to on), both on the database and the next page I get the following:
dont\\\\'t
Please can anyone tell me what am I doing wrong?
Cheers
Lulubell