主程序.asp
<%
if session("AdminName") = "" then
response.Redirect "Admin_Login.asp"
end if
%>
<!--#include file="CONN.ASP"-->
<!--#include file="Sql_Erro.asp"-->
<html>
<head></head><body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<%
id=request("id")
Set rso=Server.CreateObject("ADODB.RecordSet")
sql="select * from bmxt where id="&id
rso.Open sql,conn,3,3
if rso.eof and rso.bof then
response.Write("没有数据记录!")
else
%>
<table align="center">
<form method="post" action="index_edit.asp?action=edit&id="<%=id%>>
<tr align="center" height="39">
<td>本人手机</td><td align="center" height="39"><input type="title" name="T7" maxlength=11 style="width:100px;" value="<%=rso("T7")%>"></td>
<td >常用QQ号</td><td align="center" height="39"><input type="title" name="T23" maxlength=15 style="width:100px;" value="<%=rso("T23")%>"></td></tr>
<td align="center" height="39" colspan="2"><input type="submit" value="我要修改!" name="submit"> </td>
</tr>
</table>
<% End If
rso.close
set rso=nothing
%>
</form>
</body>
</html>《index_edit.asp》
<!--#include file="conn.asp"-->
<%
id=request("id")
%>
<%
if request("action") = "edit" then
id=request("id")
T7=request("T7")
T23=request("T23")
set rs=server.createobject("adodb.recordset")
sql="select * from bmxt where id="&id
rs.open sql,conn,1,3
rs("T7")=T7
rs("T23")=T23
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "<script language='javascript'>" & chr(13)
response.write "alert('你的登记信息修改成功!');" & Chr(13)
response.write "window.document.location.href='Admin_Index.asp';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
else
response.write "<script language='javascript'>" & chr(13)
response.write "alert('你提交的参数有误!点击确定返回重新输入!');" & Chr(13)
response.write "window.document.location.href='Admin_Index.asp';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
end if
%>
<%
if session("AdminName") = "" then
response.Redirect "Admin_Login.asp"
end if
%>
<!--#include file="CONN.ASP"-->
<!--#include file="Sql_Erro.asp"-->
<html>
<head></head><body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<%
id=request("id")
Set rso=Server.CreateObject("ADODB.RecordSet")
sql="select * from bmxt where id="&id
rso.Open sql,conn,3,3
if rso.eof and rso.bof then
response.Write("没有数据记录!")
else
%>
<table align="center">
<form method="post" action="index_edit.asp?action=edit&id="<%=id%>>
<tr align="center" height="39">
<td>本人手机</td><td align="center" height="39"><input type="title" name="T7" maxlength=11 style="width:100px;" value="<%=rso("T7")%>"></td>
<td >常用QQ号</td><td align="center" height="39"><input type="title" name="T23" maxlength=15 style="width:100px;" value="<%=rso("T23")%>"></td></tr>
<td align="center" height="39" colspan="2"><input type="submit" value="我要修改!" name="submit"> </td>
</tr>
</table>
<% End If
rso.close
set rso=nothing
%>
</form>
</body>
</html>《index_edit.asp》
<!--#include file="conn.asp"-->
<%
id=request("id")
%>
<%
if request("action") = "edit" then
id=request("id")
T7=request("T7")
T23=request("T23")
set rs=server.createobject("adodb.recordset")
sql="select * from bmxt where id="&id
rs.open sql,conn,1,3
rs("T7")=T7
rs("T23")=T23
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "<script language='javascript'>" & chr(13)
response.write "alert('你的登记信息修改成功!');" & Chr(13)
response.write "window.document.location.href='Admin_Index.asp';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
else
response.write "<script language='javascript'>" & chr(13)
response.write "alert('你提交的参数有误!点击确定返回重新输入!');" & Chr(13)
response.write "window.document.location.href='Admin_Index.asp';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
end if
%>
解决方案 »
- JSP页面上用JavaScript编写的时钟倒计时
- 关于一个时间监控提醒
- STRUTS高手请进: 一个标签错误配置问题
- 请问cookie和session的区别
- 菜鸟问题,关于javaBean
- 关于javascript的恼人问题
- [Microsoft][ODBC SQL Server Driver]无效的描述符索引是什么错误??
- 向oracle出现这样的错误,什么意思,求大神哦
- Release Version 和 Integration Version 是什么意思和区别?
- 怎么用jquery做查询弹窗?
- 如何在tomcat启动时加载一个serversocket服务?
- Hibernate中使用Creiteria,结果以List的形式返回。求打印出List中的内容
改成
<form method="post" action="index_edit.asp?action=edit&id=<%=id%>">