如何在线更改密码?
程序员文章站
2022-04-15 09:25:56
<%id = request("id")newpassword = request("password")...
<%
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]
下一篇: 如何实现某一页面只让特定的用户浏览?