我的save1代码如下:
<!--#include file="Conndb.asp"-->
<%
dim rs
dim sql
set rs=server.createobject("adodb.recordset")
sql="select * from T001 where ID < 5000"
rs.open sql,conn,1,3
rs.addnew
rs("OS1Q1")=Request("OS1Q1")
rs("OS1Q2")=Request("OS1Q2")
rs("OS1Q3")=Request("OS1Q3")
sql="select top 1 ID from T001 order by ID desc"
session("id")="ID"
conn.close
set conn=nothing
Response.Buffer = true
Response.redirect("2.asp")
Response.end
%>
2.asp.是第二个表单,save2代码是:
<!--#include file="Conndb.asp"-->
<%
dim rs
dim sql
set rs=server.createobject("adodb.recordset")
sql="select * from T001 where ID ='" & Request.form("flag") & "'"
rs.open sql,conn,1,3
rs("OS2Q5")=Request("OS2Q5")
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
If Request("OS2Q5")=8 Then
Response.Buffer = true
Response.redirect("4.asp")
Else
Response.Buffer = true
Response.redirect("3.asp")
End If
%>
flag 是在表单2中的隐藏域,值为session.
帮我分析一下