Escaping PHP GET and POST values [duplicate]
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: The ultimate clean/secure function I was informed in another thread that this bit of code was pretty useless: function getPost($s) { if (array_key_exists($s, $_POST)) return mysql_real_escape_string(htmlspecialchars($_POST[$s])); else return false; } function getGet($s) { if (array_key_exists($s, $_GET)) return mysql_real_escape_string(htmlspecialchars($_GET[$s])); else return false; } Can anybody help