文件保存为form_Validate.php
PHP代码
<title>表单验证类 Validator for PHP β</title>
<style>
body,td{font:normal 12px Verdana;color:#333333}
input,textarea,select,td{font:normal 12px Verdana;color:#333333;border:1px solid #999999;background:#ffffff}
table{border-collapse:collapse;}
td{padding:3px}
input{height:20;}
textarea{width:80%;height:50px;overfmin:auto;}
form{display:inline}
</style>
<table align="center">
<form action="form_Validate.php" method="post">
<tr>
<td>提示模式:</td><td>
<select name="emode">
<option value="1">警告提示框(客户端)</option>
<option value="2">提示框加红色文字提示</option>
<option value="3">附加红色提示</option>
<option value="4">警告提示框(服务器端)</option>
<option value="5">文字提示(服务器端)</option>
</select></td>
</tr>
<tr>
<td>真实姓名:</td><td><input name="Name"></td>
</tr>
<tr>
<td>英文名:</td><td><input name="Nick"></td>
</tr>
<tr>
<td>主页:</td><td><input name="Homepage"></td>
</tr>
<tr>
<td>密码:</td><td><input name="Password"></td>
</tr>
<tr>
<td>重复:</td><td><input name="Repeat"></td>
</tr>
<tr>
<td>信箱:</td><td><input name="Email"></td>
</tr>
<tr>
<td>信箱:</td><td><input name="Email1"></td>
</tr>
<tr>
<td>QQ:</td><td><input name="QQ"></td>
</tr>
<tr>
<td>身份证:</td><td><input name="Card"></td>
</tr>
<tr>
<td>年龄:</td><td><input name="Year"></td>
</tr>
<tr>
<td>年龄1:</td><td><input name="Year1"></td>
</tr>
<tr>
<td>电话:</td><td><input name="Phone"></td>
</tr>
<tr>
<td>手机:</td><td><input name="Mobile"></td>
</tr>
<tr>
<td>生日:</td><td><input name="Birthday"></td>
</tr>
<tr>
<td>邮政编码:</td><td><input name="Zip"></td>
</tr>
<tr>
<td>邮政编码:</td><td><input name="Zip1"></td>
</tr>
<tr>
<td>操作系统:</td><td><select name="OS"><option value="">选择您所用的操作系统</option><option value="Win98">Win98</option><option value="Win2k">Win2k</option><option value="WinXP">WinXP</option></select></td>
</tr>
<tr>
<td>所在省份:</td><td>广东<input name="Province" value="1" type="radio">陕西<input name="Province" value="2" type="radio">浙江<input