时间:2021-07-01 10:21:17 帮助过:18人阅读
PHP处理表单 请填写个人信息
验证页面:
"; }else if (strlen($name)<3||strlen($name)>10){ echo "姓名长度必须在3到10之间!
"; }else { echo "姓名: ".$name."
"; } //密码验证 if (empty($password)){ echo "密码不得为空
"; }else if (strlen($password)<3||strlen($password)>10){ echo "密码长度必须在3到10之间!
"; }else if(!ereg("[0-9a-zA-Z]+",$password)){ echo "密码必须为数字和字符组合!
"; }else { echo "密码: ".$password."
"; } //邮件地址验证 if (empty($email)){ echo "邮件地址不得为空!!!"; }else if (!ereg("^[a-zA-Z0-9_.]+@([a-zA-Z0-9_]+.)+[a-zA-Z]{2,3}$", $email)){ echo "邮件地址格式不对!!!"; }else { echo "邮件地址: ".$email."
"; } ?>返回