hey guys, i have to following function which i need to cross-check data with to make sure the data only contains A-Z a-z 0-9 and _
but at the moment, it seems to let through all symbols
function alphanumericDatacheck($data){
return
preg_match ("^[a-zA-Z0-9_]$^", $data);
}
//--- Useage example...
if (alphanumericDatacheck($username) == false){
$usernameErr = "Can only contain Letters (A-Z), Numbers (0-9) and Underscore (_)";
}can anyone suggest where im going wrong, im really no good with expressions
thanks