?? change.asp
字號(hào):
<%Response.Buffer=True%>
<!--#Include file="odbc_connection.asp"-->
<html>
<head>
<title>修改客戶記錄</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css">
<!--
body,td,th {
font-size: 14px;
}
body {
background-color: #FFFDEE;
}
-->
</style>
</head>
<body>
<% If session("id")="" Then
Response.Redirect "index.asp"
end if
%>
<h2 align="center">修改客戶記錄</h2>
<center>
<form method="post" action="">
<table border="0" width="90%" bgcolor="#CC9933">
<tr>
<td>姓名:</td><td><input type="text" name="name" size="20" ></td>
</tr><tr>
<tr>
<td>身份證:</td><td><input type="sfz" name="sfz" size="20"></td>
</tr><tr>
<td></td><td><input type="submit" value=" 確 定 "></td>
</tr>
<table>
</form>
</center>
<%
'如果沒有輸入姓名,就不執(zhí)行下列語(yǔ)句
If Trim(Request("name"))<>"" Then
Dim rs,strSql
strSql ="Select * From users Where name='" & Request("name") & "' And sfz='" & Request("sfz") & "'"
Set rs=db.Execute(strSql)
'查找匹配的記錄,如果非空,就表示找到了。則引導(dǎo)至update_form.asp
If Not rs.Bof And Not rs.Eof Then
'這里用Session傳遞記錄的id號(hào),而不是在文件后跟參數(shù),是為了安全考慮
Session("id")=rs("id")
Response.Redirect "update_form.asp"
Else
Response.Write "對(duì)不起,身份證與客戶姓名不符合,請(qǐng)重新輸入"
End If
End If
%>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -