当前位置:编程学习 > 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
%> 

上一个:如何设置会话上下文信息?
下一个:如何实时获知多少人在线?

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,