<!--#include file="conn.asp"-->
<%
if session("pass")<>"1" then
response.Write("<script language='javascript'>alert('先请登录为管理员');this.top.location.href='log.asp';</script>")
response.end()
end if
%>
<%
set rs=server.CreateObject("adodb.recordset")
sql="select*from user where id="&session("userid")
rs.open sql,cn,1,3
if request.Form("o")="xg" then
if request.Form("password")="" or request.Form("password1")="" then
response.Write("<script language='javascript'>alert('必须输入密码');this.top.location.href='admin.asp';</script>")
response.end()
end if
if request.Form("password")<>request.Form("password1") then
response.Write("<script language='javascript'>alert('2次密码必须相同');this.top.location.href='admin.asp';</script>")
response.end()
end if
rs.addnew
rs("password")=request.Form("password1")
rs.update
response.Write("<script language='javascript'>alert('修改密码成功,请记住你的密码!');this.top.location.href='admin.asp';</script>")
response.end()
end if
%>
这是我的修改密码 不知道为什么每次本来的密码没修改修改
却添加一新密码!!!!