"; } else { echo "BAD. Found something except alphabet/space in First Name.
"; return false; } if(preg_match('/^[A-Z ]+$/i', trim($input['lastName']))) { echo "GOOD. Found only alphabet in Last Name.
"; } else { echo "BAD. Found something except alphabet/space in Last Name.
"; return false; } if(preg_match('/^[A-Z ]+$/i', trim($input['title']))) { echo "GOOD. Found only alphabet in Title.
"; } else { echo "BAD. Found something except alphabet/space in Title.
"; return false; } if(preg_match('/^[^<>].*([0-9]+.*[A-Z])|([A-Z]+.*[0-9]+).*$/i', trim($input['comment']))) { echo "GOOD. Found only alphabet in Comment.
"; } else { echo "BAD. Found something except alphabet, maybe, < or > in Comment.
"; return false; } if(preg_match('/^[0-9]{1}$/i', trim($input['priority']))) { echo "GOOD. Found only number in Priority.
"; } else { echo "BAD. Found something except number in Priority.
"; return false; } return true; } function checkInput($input) { if(trim($input['firstName']) == '' || trim($input['lastName']) == '' || trim($input['title']) == '' || trim($input['comment']) == '' || trim($input['priority']) == '' ) { return false; } return true; } ?>