asp修改密码代码! 10
小女子急求高手解决!<!--#includefile=conn.asp--><%dimymm,newmm,newmma,sql,rsymm=request("ymm")n...
小女子急求高手解决!
<!--#include file=conn.asp-->
<%
dim ymm,newmm,newmma,sql,rs
ymm=request("ymm")
newmm=request("newmm")
newmma=request("newmma")
yhm=session("hy_mane")
set rs=server.createobject("adodb.recordset")
sql="select * from huiyuan where hy_password='"&ymm&"'"
rs.Open sql,conn,1,3
if not rs.eof then
if ymm<>rs("hy_password") then
response.Write "<script language=javascript>alert('原密码错误');location.href='huiyuan2.asp'</script>"
if request("newmm")<>request("newmma") then
response.Write "<script language=javascript>alert('二次输入的密码不一致');location.href='huiyuan2.asp'</script>"
else
rs("hy_password")=xmm
rs.Update
response.Write "<script language=javascript>alert('修改成功!');location.href='huiyuan2.asp'</script>"
end if
else
response.Write "<script language=javascript>alert('找不到这个人');location.href='huiyuan2.asp'</script>"
end if
end if
%>
问题已经解决了 谢谢了 展开
<!--#include file=conn.asp-->
<%
dim ymm,newmm,newmma,sql,rs
ymm=request("ymm")
newmm=request("newmm")
newmma=request("newmma")
yhm=session("hy_mane")
set rs=server.createobject("adodb.recordset")
sql="select * from huiyuan where hy_password='"&ymm&"'"
rs.Open sql,conn,1,3
if not rs.eof then
if ymm<>rs("hy_password") then
response.Write "<script language=javascript>alert('原密码错误');location.href='huiyuan2.asp'</script>"
if request("newmm")<>request("newmma") then
response.Write "<script language=javascript>alert('二次输入的密码不一致');location.href='huiyuan2.asp'</script>"
else
rs("hy_password")=xmm
rs.Update
response.Write "<script language=javascript>alert('修改成功!');location.href='huiyuan2.asp'</script>"
end if
else
response.Write "<script language=javascript>alert('找不到这个人');location.href='huiyuan2.asp'</script>"
end if
end if
%>
问题已经解决了 谢谢了 展开
2个回答
展开全部
<!--#include file=conn.asp-->
<%
dim ymm,newmm,newmma,sql,rs
ymm=request("ymm")
newmm=request("newmm")
newmma=request("newmma")
yhm=session("hy_name")
set rs=server.createobject("adodb.recordset")
sql="select hy_password from huiyuan where hy_name='"&yhm&"'"
rs.Open sql,conn,1,3
if not rs.eof then
if ymm<>rs("hy_password") then
response.Write "<script language=javascript>alert('原密码错误');location.href='huiyuan2.asp'</script>"
if newmm<>newmma then
response.Write "<script language=javascript>alert('二次输入的密码不一致');location.href='huiyuan2.asp'</script>"
else
rs("hy_password")=newmm
rs.Update
response.Write "<script language=javascript>alert('修改成功!');location.href='huiyuan2.asp'</script>"
end if
else
response.Write "<script language=javascript>alert('找不到这个人');location.href='huiyuan2.asp'</script>"
end if
end if
%>
<%
dim ymm,newmm,newmma,sql,rs
ymm=request("ymm")
newmm=request("newmm")
newmma=request("newmma")
yhm=session("hy_name")
set rs=server.createobject("adodb.recordset")
sql="select hy_password from huiyuan where hy_name='"&yhm&"'"
rs.Open sql,conn,1,3
if not rs.eof then
if ymm<>rs("hy_password") then
response.Write "<script language=javascript>alert('原密码错误');location.href='huiyuan2.asp'</script>"
if newmm<>newmma then
response.Write "<script language=javascript>alert('二次输入的密码不一致');location.href='huiyuan2.asp'</script>"
else
rs("hy_password")=newmm
rs.Update
response.Write "<script language=javascript>alert('修改成功!');location.href='huiyuan2.asp'</script>"
end if
else
response.Write "<script language=javascript>alert('找不到这个人');location.href='huiyuan2.asp'</script>"
end if
end if
%>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询