If magic_quotes_gpc is on will I still need to use striplashes() if no why? is so when and where?
If magic_quotes_gpc is on will I still need to use striplashes() if no why?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
gpc in
magic_quotes_gpcstands for GET, POST, COOKIE. So everything in$_GET,$_POSTand$_COOKIEgot escaped. If magic_quotes_gpc is turned on, you should run stripslashes on variables in those arrays.Remember to run
mysql_real_escape_string()on variables in queries (except for prepared statements)magic_quotes are deprecated, it’s recommended to disable it and escape variables using
mysql_real_escape_string()(for MySQL). Put the following in a .htaccess file for disabling magic_quotes_gpc: