asp一个页面多个表单如何同时提交到另外一个页面
提交页面:这个页面运行正常(头一回写,请见谅)<%
id=request.QueryString("id")
sjb=request.Cookies("sjb")
dim conn
set conn =server.createobject("adodb.connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&server.MapPath(request.Cookies("wjml"))
set rst1=server.CreateObject("adodb.recordset")
Sql1="select * from "&sjb&" where db_id="&id
rst1.open sql1,Conn,1,1
j=rst1.Fields.count
%>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="1002" border="1" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="300" height="30" align="center" valign="middle">名 称</td>
<td colspan="2"><%=rst1("db_name")%></td>
</tr>
<tr>
<td height="30" align="center" valign="middle">时间</td>
<td colspan="2"><form id="form2" name="form2" method="post" action="xr.asp">
<label for="lysj"></label>
<input name="lysj" type="text" id="lysj" size="10" maxlength="10" value=<%=rst1(rst1.Fields(2).Name)%> />
</form></td>
</tr>
<tr>
<td height="30" align="center" valign="middle">内 容</td>
<td colspan="2"><%=rst1("db_lynr")%></td>
</tr>
<tr>
<td height="1" align="center" valign="middle" bgcolor="#000000"></td>
<td colspan="2" bgcolor="#000000"></td>
</tr>
<tr>
<td height="30" align="center" valign="middle">人员</td>
<td><form id="form3" name="form3" method="post" action="xr.asp?id=<%=rst1("db_id")%>">
<input type="submit" name="button" id="button" value="保存" />
</form></td>
<td></td>
</tr>
<tr>
<%
abc=Request.Form("abc")
%>
<%
for i=4 to (j-1)'把表格、数据、复选框进行循环
%>
<td height="30" align="center" valign="middle">
<%
if isnull(rst1.Fields(i).Name)<>true then
Response.Write(rst1.Fields(i).Name)
end if
%>
</td>
<td width="100" align="center" valign="middle"><form id="form1" name="form1" method="post" action="xr.asp">
<input name="abc" type="checkbox" id="abc" value="ok" <% if rst1(rst1.Fields(i).Name)<>"" then Response.Write("checked")%> />
<label for="abc"></label>
</form></td>
<td>
</td>
</tr>
<%
next
%>
</table></td>
</tr>
</table>
<%
rst1.close
set rst1=nothing
conn.close
set conn=nothing
%>
另一个页面(xr.asp):读取数据写入数据库(最终写入不了)
<%
id=request("id")
sjb=request.Cookies("sjb")
wjml=request.Cookies("wjml")
lysj=request("lysj")'读不出来值
abc1 = request.Form("abc")'读不出来值
set conn =server.createobject("adodb.connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&server.MapPath(wjml)
set rs=server.CreateObject("adodb.RECORDSET")
sql="select * from "&sjb&" where db_id="&id
rs.open sql,conn,1,3
if abc1 <> "" then
arr = split(abc1,",")
for i=4 to ubound(arr)
rs("abc") = arr(i)
rs.update
next
rs(rs.Fields(2).Name)=lysj
end if
%>
<%
response.write (wjml&"--")'能打出值
response.write (sjb&"--")'能打出值
response.write (id&"--")'能打出值
response.write (lysj&"--")'打不出值
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
请指教。