Okay I create ashort but sweet order form. Esentailly I have a numeric ID 1 
through what ever associated with a product. I create the form dynamically so 
for product 1 I will have a a field for quantity called Quantity1, and a 
subtotal called Subtotal1. The problem I am having in on the action page I want 
loop the items into a Order Items table only if the quantity is greater that 
zero. But where I am really blowing up is that I am trying to dynamically 
create the form names Quantity1 and Subtotal1 for the insert and I am blowing 
up.  Here is what I gopt so far. Note getprods is a simply a query to my 
products table where I grab the itemid in sequential order.

<cfloop query="getprods">

<cfset fid = 'form.quantity'&ToString(#itemid#)>

<CFIF fid NEQ 0>

 <cfset subt = 'Subtotal'&ToString(#itemid#)>
 <cfset subtot = #subt#>


 <cfquery name="ins" datasource="#dbname#">
  INSERT INTO orderitems
  (orderid,itemid,subtotal,qty)
  VALUES
  ('#getmx.orderid#',#itemid#,#subtot# ,#fid#)
 </cfquery>
</CFIF>
</cfloop>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226988
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to