代码如下:
<%
dim admin_name,admin_pwd,admin_pwd1,admin_pwd2
admin_name=trim(request("admin_name"))
admin_pwd=trim(request("pwd"))
admin_pwd1=trim(request("pwd1"))
admin_pwd2=trim(request("pwd2"))
set rs=server.createobject("adodb.recordset")
sql="select * from UserInfo where userid='"&admin_name&"'"
rs.open sql,conn,1,3
if pwd="" or pwd1="" or pwd2="" then
Response.write "密码不能为空!<br><a href='admin.asp'><font
color='#FF00FF'>返回用户管理</font></a>"
Response.end
end if
if newpwd1<>newpwd2 then
Response.write "新密码输入不一致!<br><a href='admin.asp'><font
color='#FF00FF'>返回用户管理</font></a>"
Response.end
end if
Sql="select * from UserInfo where userpwd='"&trim(pwd)&"'"
Rs.open Sql,Conn,3,2
if Rs.bof and Rs.eof then
Response.write "旧密码输入错误!<br><a href='admin.asp'><font
color='#FF00FF'>返回用户管理</font></a>"
Response.end
rs("userpwd")=admin_pwd1
rs.update
rs.close
set rs=nothing
response.write "<script language='javascript'>window.confirm('密码已经修改
成功,请返回')</script>"
response.write "<script language='javascript'>parent.window.history.go(-
1);</script>"
end if
%>
高手帮忙 现谢过了!
------解决方案--------------------------------------------------------
- VBScript code
'这里的pwd, pwd1和pwd2都是没有在页面找到定义的。if pwd="" or pwd1="" or pwd2="" thenend if