darkfreaks Posted December 10, 2008 Share Posted December 10, 2008 <?php //**********loops all $_POST variables and cleans them automatically*************/// if(get_magic_quotes_gpc()) { //clean XSS/SQL injection function clean($var) { $var=strip_tags(trim(mysqli_real_escape_string($var)));//changed $text to $var my bad $var=htmlspecialchars($var,ENT_QUOTES); return $var; } array_walk_recursive($_POST,'clean'); } ?> Link to comment https://forums.phpfreaks.com/topic/134547-please-test-for-security/page/6/#findComment-711913 Share on other sites More sharing options...
ricmetal Posted December 13, 2008 Author Share Posted December 13, 2008 thanks dark, ill have to check that later though working these days gratzi Link to comment https://forums.phpfreaks.com/topic/134547-please-test-for-security/page/6/#findComment-714395 Share on other sites More sharing options...
darkfreaks Posted December 14, 2008 Share Posted December 14, 2008 nevermind Link to comment https://forums.phpfreaks.com/topic/134547-please-test-for-security/page/6/#findComment-714936 Share on other sites More sharing options...
Recommended Posts