📅  最后修改于: 2022-03-11 14:54:22.988000             🧑  作者: Mango
if (!(filter_var($_POST["mobile_no"], FILTER_VALIDATE_EMAIL))) {
$raw_input_length = strlen($mobile_no);
$phone = preg_replace("/[^\d]/", "", $mobile_no);
if($raw_input_length == strlen($phone)){
if (strlen($phone) !== 10) {
$member_mobile_no = '';
$show_otp = 0;
$error_box = 1;
$error = "Please Enter a Valid Mobile Number.";
$color = "red";
}
}
else{
$member_mobile_no = '';
$show_otp = 0;
$error_box = 1;
$error = "Please Enter a Valid Email Id.";
$color = "red";
}
}