Return to Snippet

Revision: 3051
at May 27, 2007 11:53 by llbbl


Initial Code
function cleanuserinput($dirty){
	if (get_magic_quotes_gpc()) {
		$clean = mysql_real_escape_string(stripslashes($dirty));	 
	}else{
		$clean = mysql_real_escape_string($dirty);	
	} 
	return $clean;
}

Initial URL


Initial Description


Initial Title
Anti-SQL Injection Function

Initial Tags
mysql, php, textmate, security

Initial Language
PHP