提交的代码:
<table align="center">
<tr><td>
<%
sql="select * from dxgl"
set rs=conn.execute(sql)
%>
<form name="form1" method="post" action="bc1.asp">
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" style="border-collapse:collapse ">
<tr>
<td height="30" colspan="2" background="Image/titlebg.gif"><div align="center"><strong>短信内容</strong></div></td>
</tr>
<%
i=1
do while not rs.eof
%>
<tr>
<td width="137" height="20"><div align="right">电话号码</div></td>
<td width="463"><input type="text" name="tel" value="3"></td>
</tr>
<tr>
<td height="20"><div align="right">地址</div></td>
<td><input name="adds" type="text" value="5" size="60"></td>
</tr>
<%
rs.movenext
i=i+1
loop
%>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="Submit" value="提交">
<input name="mun" type="hidden" value="<%=i%>">
</div></td>
</tr>
</table>
</form>
</td></tr></table>
保存的代码:
<%
mun=request("mun")
for i=1 to mun
tel=request("tel")
adds=request("adds")
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from xx"
rs.open sql,conn,3,3
rs.addnew
rs("tel")=tel
rs("adds")=adds
rs.update
rs.close
set rs=nothing
next
%>
[求助]用表单向数据库提交多条信息出错,有代码,望各位指教啊。