这样吧,我直接教你删除验证码吧。
<%
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
%>
<%
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
%>
问题补充:
看下 session被禁用没有