明辉站/网站教程/内容

一个让用户更改密码的容易程序!

网站教程2024-02-09 阅读
[摘要]<% id = Request("id") newpassword = Request("password") newpasswordtemp = Request("passwordtemp") If newpassword <...

<%
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
%>
此程序非常简单,相信各位都会懂!跟“如何使用 Microsoft Access 和 Active Server Pages 加密你的页面 !”的结合,实现让用户更改密码就简单了!
如要看例子请到http://www.hy.zj.cn 的留言板去! (出处:热点网络)

……

相关阅读