$username = trim($_POST['user_name']);
$RegExp='/^(?:13|15|18)[0-9]{9}$/'; //手机
$RegExpemail='/^[a-z0-9][a-z\.0-9-_]+@[a-z0-9_-]+(?:\.[a-z]{0,3}\.[a-z]{0,2}|\.[a-z]{0,3}|\.[a-z]{0,2})$/i'; //邮箱
if(preg_match($RegExp,$username)){
$array['member_mobile'] = $username;
}else if(preg_match($RegExpemail,$username)){
$array['member_email'] = $username;
}else{
$array['member_name'] = $username;
}
$array['member_passwd'] = md5($_POST['password']);
$member_info = $model_member->infoMember($array);
shopnc 实现手机、邮箱、用户名登录
最新推荐文章于 2021-03-31 21:15:49 发布