📄 change.asp
字号:
<%Response.Buffer=True%>
<!--#Include file="odbc_connection.asp"-->
<html>
<head>
<title>修改成员</title>
</head>
<body background="post-42-1083417716.jpg">
<h2 align="center"><font color=black face="隶书" size=30>修改成员</font></h2>
<center>
<form method="post" action="">
<table border="0" width="90%" bgcolor="#E6E6E6">
<tr>
<td>姓名:</td><td><input type="text" name="name" size="20" >**</td>
</tr>
<tr>
<td>密码:</td><td><input type="password" name="password" size="20">**</td>
</tr><tr>
<td></td><td><input type="submit" value=" 确 定 "></td>
</tr>
<table>
</form>
</center>
<%
'如果没有输入姓名,就不执行下列语句
If Trim(Request("name"))<>"" Then
Dim rs,strSql
strSql ="Select * From users Where name='" & Request("name") & "' And password='" & Request("password") & "'"
Set rs=db.Execute(strSql)
'查找匹配的记录,如果非空,就表示找到了。则引导至update_form.asp
If Not rs.Bof And Not rs.Eof Then
'这里用Session传递记录的id号,而不是在文件后跟参数,是为了安全考虑
Session("id")=rs("id")
Response.Redirect "update_form.asp"
Else
Response.Write "对不起,密码不正确,请重新输入"
End If
End If
%>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -