Escaping (') and (") with magic_quotes_gpc on
Posted on 2008-06-10
Directive Local Value Master Value
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
Commercial hosting cannot touch php.ini
Problem, I need to carry posted data from user over 4 different pages on the fifth pages sql query to insert the data, at this point I'm using hidden fields in the form, so basically user fill a form go to the next page information is displayed as well as some other fields, the information displayed is also in the new form as hidden value and then we go to the next page and so on.
This work alright untill somebody use (") than wathever is after the first that is being cut off, I tried mysql_real_escape_string, addslashes, stripslashes etc and I cannot get it right.
Any advice would be greatly appreciated.