dim a,b
a=request("a")
b=reuqest("b")
if conn.execute("select count(id) from 表 where a='"&a&"','"&b&"'")(0)<0 then
response.Redirect("a1.asp?a&="&a&"&b="&b)
end if
dim a,b
a=request("a")
b=reuqest("b")
if conn.execute("select count(*) from 表 where a='"&a&"' and b='"&b&"'")(0)<0 then
response.Redirect "a1.asp"
end if
dim a,b
a=request("a")
b=reuqest("b")
if conn.execute("select count(id) from 表 where a='"&a&"','"&b&"'")(0)<0 then
response.Redirect("a1.asp?a&="&a&"&b="&b)
end if
un=request("a")
pwd=request("b")
opensql'以conn为对像名打开数据库
set rs=server.CreateObject("adodb.recordset")
sql="select Password from Administrator where LoginName like '"&un&"'" rs.open sql,conn,1,1
if not rs.eof then
if trim(rs("password"))=pwd then
session("adminlogin")=trim(un)
response.Write("<script type=""text/javascript"">window.location.href='manager.asp';</script>")
else
response.Write("<script type=""text/javascript"">window.location.href='index.asp?err="&server.URLEncode("您的用户名或密码错误!")&"';</script>")
end if
else
response.Write("<script type=""text/javascript"">window.location.href='index.asp?err="&server.URLEncode("您的用户名或密码错误!")&"';</script>")
end if
rs.close
set rs=nothing
closesql'关闭数据库