主题:[讨论]数据库的对应字段都改了,后台登陆时提示:用户名和密码出错
<!--#include file="conn.asp"-->
<!--#include file="../md5.asp"-->
<%
session.Timeout=100 '登陆超时时间(单位为分钟)
dim fdpc,fdpcwd
fdpc=replace(trim(request("fdpc")),"'","")
fdpcwd=md5(replace(trim(request("fdpcwd")),"'",""))
if request("verifycode")="" then
response.write "<script LANGUAGE='javascript'>alert('请输入确认码!');history.go(-1);</script>"
response.end
elseif session("verifycode")="" then
response.write "<script LANGUAGE='javascript'>alert('请不要重复提交,如需重新登陆请返回登陆页面!');history.go(-1);</script>"
response.end
elseif session("verifycode")<>trim(request("verifycode")) then
response.write "<script LANGUAGE='javascript'>alert('您输入的确认码有误,请重新输入!');history.go(-1);</script>"
response.end
end if
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from fd_gmpc where fdpc='"&fdpc&"' and fdpcwd='"&fdpcwd&"' " ,conn,1,1
if not(rs.bof and rs.eof) then
if fdpcwd=rs("fdpcwd") then
session("fdpc")=trim(rs("fdpc"))
session("flag")=int(rs("flag"))
rs.Close
set rs=nothing
response.Redirect "index.asp"
else
response.write "<script LANGUAGE='javascript'>alert('登陆失败,请检查您的登陆名和密码!');history.go(-1);</script>"
end if
else
response.write "<script LANGUAGE='javascript'>alert('登陆失败,请检查您的登陆名和密码!');history.go(-1);</script>"
end if
%>
数据库的对应字段都改了,后台登陆时提示:用户名和密码出错。请大家帮忙看看。
<!--#include file="../md5.asp"-->
<%
session.Timeout=100 '登陆超时时间(单位为分钟)
dim fdpc,fdpcwd
fdpc=replace(trim(request("fdpc")),"'","")
fdpcwd=md5(replace(trim(request("fdpcwd")),"'",""))
if request("verifycode")="" then
response.write "<script LANGUAGE='javascript'>alert('请输入确认码!');history.go(-1);</script>"
response.end
elseif session("verifycode")="" then
response.write "<script LANGUAGE='javascript'>alert('请不要重复提交,如需重新登陆请返回登陆页面!');history.go(-1);</script>"
response.end
elseif session("verifycode")<>trim(request("verifycode")) then
response.write "<script LANGUAGE='javascript'>alert('您输入的确认码有误,请重新输入!');history.go(-1);</script>"
response.end
end if
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from fd_gmpc where fdpc='"&fdpc&"' and fdpcwd='"&fdpcwd&"' " ,conn,1,1
if not(rs.bof and rs.eof) then
if fdpcwd=rs("fdpcwd") then
session("fdpc")=trim(rs("fdpc"))
session("flag")=int(rs("flag"))
rs.Close
set rs=nothing
response.Redirect "index.asp"
else
response.write "<script LANGUAGE='javascript'>alert('登陆失败,请检查您的登陆名和密码!');history.go(-1);</script>"
end if
else
response.write "<script LANGUAGE='javascript'>alert('登陆失败,请检查您的登陆名和密码!');history.go(-1);</script>"
end if
%>
数据库的对应字段都改了,后台登陆时提示:用户名和密码出错。请大家帮忙看看。