有誰能幫我查一下,這段代碼,是有錯誤,怎麽登都提示登陸失敗.
<%dim admin,password
admin=replace(trim(request("admin")),"'","")
password=md5(replace(trim(request("password")),"'",""))
if admin="" or password="" then
response.Write "<center><a href=login.asp><font color=red size=2>对不起,登陆失败,请检查您的登陆名和密码</font></a></center>"
response.end
end if
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from shop_admin where admin='"&admin&"' and password='"&password&"' " ,conn,1,1
if not(rs.bof and rs.eof) then
if password=rs("password") then
session("ksrwg5s3admine3")=trim(rs("admin"))
session("flag")=int(rs("flag"))
session.Timeout=20
rs.Close
set rs=nothing
response.Redirect "index124512.asp"
else
response.write "<script LANGUAGE='javascript'>alert('对不起,登陆失败!');window.location.reload('javascript:history.go(-1)')</script>"
end if
else
response.write "<script LANGUAGE='javascript'>alert('对不起,登陆失败!');window.location.reload('javascript:history.go(-1)')</script>"
end if
%>