欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

如何在线更改密码?

程序员文章站 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]