asp网站后台登陆总是提示验证码错误,明明是正确的,下面我把代码发出来,希望高手指点下,删除验证码也好

2024-12-25 10:49:58
推荐回答(3个)
回答1:

这样吧,我直接教你删除验证码吧。



<%
dim username,password
username=request.Form("username")
username = userif(username)
password=request.Form("password")
password = userif(password)
password=md5(replace(trim(Request("password")),"'",""),32)
set rs=server.createobject("adodb.recordset")
sql="select [user],[pwd] from [admin] where[user]='"&username&"' and [pwd]='"&password&"'"
rs.open sql,conn,1,1
if rs.eof then
%>

<%
else
session("user")=username
session("pwd")=password
response.Redirect("admin_index.asp")
end if
%>

回答2:




<%
dim username,password
username=request.Form("username")
username = userif(username)
password=request.Form("password")
password = userif(password)
password=md5(replace(trim(Request("password")),"'",""),32)

'response.Write username

set rs=server.createobject("adodb.recordset")
sql="select [user],[pwd] from [admin] where[user]='"&username&"' and [pwd]='"&password&"'"
rs.open sql,conn,1,1
if rs.eof then
%>

<%
else
session("user")=username
session("pwd")=password
response.Redirect("admin_index.asp")
end if

%>
问题补充:

回答3:

看下 session被禁用没有