function antiinjection($str) { $banwords = array ("'", ",", ";", "--"); if ( eregi ( "[a-zA-Z0-9]+", $str ) ) { $str = str_replace ( $banwords, '', strtolower ( $str ) ); } else { $str = NULL; } return $str; }