当前位置:编程学习 > asp >>

如何在线更改密码?

答案:

<%

id = Request("id")

newpassword = Request("password")

newpasswordtemp = Request("passwordtemp")

If newpassword <> newpasswordtemp Then

Response.Write "<center>对不起,新密码与新密码确认不同.请重试!</center>"

Response.End

End If

Set conn = Server.CreateObject("ADODB.Connection")

DBPath = Server.MapPath("userinfo.mdb")

conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath

Set rs = Server.CreateObject("ADODB.Recordset")

sql="update userinfo set 密码='" & newpassword & "' where id="&id

rs.Open sql, conn, adOpenDynamic, adLockPessimistic

%>

[1]

上一个:如何防止计数器刷新计数?
下一个:如何防止未经注册的用户绕过注册界面直接进入应用系统?

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,