Created
May 8, 2013 19:02
-
-
Save scragg0x/5542772 to your computer and use it in GitHub Desktop.
mysql escape request
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
<?php | |
// Use for $_POST $_GET and $_COOKIE vars | |
function mysql_escape_request($str){ | |
if (get_magic_quotes_gpc()) { | |
$str = stripslashes($str); | |
} | |
return mysql_real_escape_string($str); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment