1,showcart.asp
<form action="modicart.asp" method="post" name="form1">
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
<input name="<%=(rsShowcart.Fields.Item("fID").Value)%>" type="text" id="quantity" value="<%=(rsShowcart.Fields.Item("price").Value)%>" size="5">
-----------------------------------------------------------------------------
2,modicart.asp
<%
For Each objItem In Request.Form
Command1__strQuantity = Request.Form(Cstr(objItem))
Command1__strID = Cstr(objItem)
%>
<%
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_conn_STRING
Command1.CommandText = "UPDATE orderdetail SET quantity ='"&Command1__strQuantity&"' WHERE fID = "&Command1__strID
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
%>
<% next %>
请教高手,为何表单参数不能传递到modicart.asp页,错在哪?小弟的主要意思是将表单数据传递后进行批更新,小弟跪谢了!
[此贴子已经被作者于2005-12-6 15:50:12编辑过]