⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 change.asp

📁 一个用ASP写的小型管理程序
💻 ASP
字号:
<%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>
	<%
	'如果没有输入姓名,就不执行下列语句
	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)
		'查找匹配的记录,如果非空,就表示找到了。则引导至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> 
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -