<!--#include file="md5.asp"-->
<%
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from member where username='"&session("admin")&"'",conn,1,3
if md5(trim(request("password")))<>rs("newpin") then
response.Write "<script language=javascript>alert('原密码错误,请返回重新输入');history.go(-1);</script>"
response.End
else
rs("newpin")=md5(trim(request("password2")))
rs.Update
rs.Close
set rs=nothing
session("admin")=""
session("flag")=""
response.Write "<script language=javascript>alert('更改成功,请用新密码重新登陆!');history.go(-1);</script>"
end if
response.End
end if
%>
这是一段修改密码的程序,表名member,密码字段名newpin,调试时每次都弹出对话框"原密码错误,请返回重新输入
为什么?怎么解决?