首页 > 学院 > 编程设计 > 正文

如何让用户也能修改密码?

2020-06-19 13:50:16
字体:
来源:转载
供稿:网友

<%

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]

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表