a = request.form("提交值")
<%
if a <> "不过过验证" then
response.Write"<script language=javascript>alert('禁止攻击斑竹!');window.document.location.href='location.history.goto(-1)'</script>" '返回前一页或跳到当页 'location.history.goto(-1)' 'a.asp'
end if
%>
set rs=server.createobject("adodb.recordset")
sql="select * from Admin where password='"&password&"' and username='"&username&"'"
rs.open sql,conn,1,3
if rs.bof and rs.eof then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>用户名或密码错误!!!</li>"
[Quote=引用 6 楼 larsson111 的回复:]
还是有疑问, 比如 我后台用a1=trim(request("a")) 获得了from提交的数据, 如何验证, 比如验证它必须是正整数,不对就跳到test.asp
[/Quote]
<%
if isnumeric(a1)=false or a1<0 then
response.redirect test.asp
end if
%>