// Function to santize form input function isAlphaNumeric($str) { return preg_match("[A-Z,a-z,0-9]*", $str); }