用户密码修改代码如何写?

来源:百度知道 编辑:UC知道 时间:2024/05/15 23:49:27
用户密码修改代码如何写?
越详细越好
不好意思,说漏了,用ASP语言写,谢谢~!
做网站啊,就是不会用户自己修改密码的代码

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<!--#include virtual="/database/conn.asp" -->
<% set rs=server.CreateObject("adodb.recordset")
sql="select * from member where username='"&request("username")&"'"
rs.open sql,conn,1,3
if rs.eof then%>
<script>
alert("该用户不存在!")
history.back()
</script>
<%
rs.close
set rs=nothing
response.End()
elseif rs("password")<>Request.Form("password") then
%>
<script>
alert("旧密码错误!")
history.back()
</script>
<%
rs.close
set rs=nothing

else %>
<%
rs("password")=Request.Form("newpassword")
rs.update
end if
%>

<script>
alert