if adminName = "" then foundErr = true call Alert(1,"请输入用户名!","") response.End() end if if adminPWD = "" then foundErr = true call Alert(1,"请输入密码!","") response.End() end if
if FoundErr <> true then sql = "select * from member where userName = '"&adminName&"' and flag = 1" rs.open sql,conn,1,3 if rs.bof and rs.eof then call Alert(1,"登录失败,用户名或密码不正确!","") else if md5(adminPWD) <> rs("userPass") then call Alert(1,"登录失败,用户名或密码不正确!","") else loginIP = rs("loginIP") rs("lastLoginIP") = loginIP rs("loginIP")=Request.ServerVariables("REMOTE_ADDR") loginDate=rs("loginDate") rs("loginDate")=now() rs("lastLoginDate")=loginDate rs("loginCount")=rs("loginCount")+1 rs.update session("adminID") = rs("id") session.Timeout = 60 response.Redirect("Index.asp") rs.close end if end if end if %>
以上代码是正确的 由于之前复制你的代码没有去掉,造成一个错误 语句未结束 /lossgin.asp, line 26, column 46 siteexec="select * from rxadmin where siters("rxid")='"&trim(request.Form("userid"))&"'"
呵呵,是我的疏忽,不好意思,复制你的代码没去掉 应该是
siteexec="select * from rxadmin where rxid='"&trim(request.Form("userid"))&"'"