处理页面:
<!--#include file="conn.asp"-->
<%dim username,password
username=trim(request.Form("username"))
password=trim(request.Form("password"))
%>
<%set rs=server.CreateObject("adodb.recordset")
sql4="select * from xtadmin where username='"&username&"'"
rs.open sql4,conn,1,1
if rs.eof and rs.bof then
response.Write ("<script language=javascript>alert('用户名不正确!');history.go(-1)</script>")
else
if rs("password")<>password then
response.Write ("<script language=javascript>alert('密码不正确!');history.go(-1)</script>")
else
response.Cookies("username")=rs("username")
response.Redirect "cg.asp"
rs.close
set rs=nothing
end if
end if%>
<%
conn.close
set conn=nothing
%>
浙公网安备 33010602011771号