刘大黑的回答:定义Sql语句那行改成如下.. sql="select * from admin where username='"&username&"' and password='"&password&'"
刘大黑的回答:定义Sql语句那行改成如下.. sql="select * from admin where username='"&username&"' and password='"&password&'"
王净的回答:程序不完整! if request("action")="login" then username=request("username") password=request("password") set rs=server.CreateObject("adodb.recordset") sql="select * from admin where username='"&username&"' and password='"&password&"'" rs.open sql,conn,3,3 if rs.eof then response.Write("用户名和密码不匹配") else session("username")=rs("username") session("quanxian")=rs("quanxian") response.Redirect "loginok.asp" end if end if //少两个end if |