Created
September 30, 2014 01:06
-
-
Save d4rkd0s/f3fd77d50ddfd7399fc4 to your computer and use it in GitHub Desktop.
Magic Quotes in PHP5.4+ (How to fix GET's and POST's and get them escaped)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This replicates magic_quotes_gpc in PHP 5.4+ | |
foreach($_POST as $key => $val){ | |
$_POST[$key] = addslashes($val); | |
} | |
foreach($_GET as $key => $val){ | |
$_GET[$key] = addslashes($val); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment