登陆出现问题!
代码如下! <% response.buffer=flase sqldbserver="(local)" sqldbid="sa" sqldbpw="sa" sqldbname="jhxfnew" strsql="provider=sqloledb.1;persist security info=false;server="&sqldbserver&";user id="&sqldbid&";password=;database="&sqldbname&";" set connn=server.createobject("adodb.connection") connn.open strsql userid=request("userid") if userid="" then response.write"<p align='center'>您忘记了输入用户名</p>" response.end end if password=request("password") if password="" then response.write"<p align='center'>您忘记了输入密码</p>" response.end end if set rs=server.createobject("adodb.recordset") sql="select * from login where userid='"&userid&"'" rs.open sql,connn,1,3 if rs.eof then response.write"<p align='center'>登陆失败</p>"//错误在此!报“登陆失败”为何帮看看!我试了找不出来! response.end else if rs("password")<>password then response.write "<p align='center'>登陆失败</p>" response.end end if end if session("userid")=rs("userid") session("username")=rs("username") session("usernn")=rs("netname") session("qx")=rs("qx") session("bm")=rs("bm") session("login")=1 rs.close set rs=nothing connn.close set connn=nothing%> <% response.redirect ("../index.asp") %> |