pwdedit.asp
来自「本程序所有数据库文件都以.sql文件保存在Database文件夹里; 2、首先在」· ASP 代码 · 共 30 行
ASP
30 行
<!--#include file="conndb.asp"-->
<html>
<head>
<title>用户管理</title>
</head>
<body>
<%
uid = Request.QueryString("uid")
orgpwd = Request("orgpwd")
'判断是否存在此用户
flag = Session("flag")
If flag=0 Then
sql = "Select * from Person where UserName='"&uid&"' and Pwd='"&orgpwd&"'"
sql_update = "Update Person Set Pwd='"&Request("pwd")&"' Where UserName='"&uid&"'"
Else
sql = "Select * from Company where CName='"&uid&"' and Pwd='"&orgpwd&"'"
sql_update = "Update Company Set Pwd='"&Request("pwd")&"' Where CName='"&uid&"'"
End If
Set rs = Conn.Execute(sql)
If rs.EOF Then
Response.Write "<Script language='JavaScript'>alert('不存在此用户或密码错误!');history.go(-1);</script>"
Else
Conn.Execute(sql_update)
Session("user_id") = uid
Session("user_pwd") = Request("pwd")
Response.Write "<Script language='JavaScript'>alert('更改密码成功!');history.go(-1);</script>"
End If
%>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?