[求助]如何同时在一个表单中实现验证用户名密码,邮箱的验证
如何同时在一个表单中实现验证用户名密码,邮箱的验证呢?
[CODE]1-1.asp
<form action="1-2.asp" method="POST">
用户名:<input type="text" name="User" /><br />
密 码:<input type="pass" name="pass" /><br />
E-mail:<input type="text" name="mail" /><br />
<input type="submit" value="提交" />
</form>
1-2.asp
<%
User=Request.form("User")
pass=Request.form("pass")
mail=Request.form("mail")
set rs=server.createobject("adodb.recordset")
rs.open "select * from Username where User='"&User&"' and mail='"&mail&"'",conn,1,3
if not(rs.bof and rs.eof) then
response.write "用户名和Email已存在!"
else
rs.addnew
rs("User")=User
rs("pass")=pass
rs("mail")=mail
rs.update
response.write "注册成功"
end if
rs.close
set rs=nothing
%>[/CODE]