PHP-Code:
[b]function is_mail_correct($f_mail_to_verify,$f_mail_verify_result) {[/b]
if (eregi("^([0-9a-z\-\_\.])*@([0-9a-z\-\_\.])*\\.([a-z]){2,3}$",$f_mail_to_verify)) {
$f_mail_verify_result = true;
}
return $f_mail_verify_result;
}
$mail = "marco_jahn@web.de";
if (is_mail_correct($f_mail_to_verify = $mail, $f_mail_verify_result = false) == true) {
echo "Mail gültig";
} else {
echo "Mail ungültig";
}
gruss
Kommentar