How about this. Via Brute Force...
<cfset subtot1 = 0> <cfset subtot2 = 0> <cfif form.age1 LT 11><cfset subtot2 = subtot2 + 1></cfif> <cfif form.age1 GT 10><cfset subtot1 = subtot1 + 1></cfif> <cfif form.ageNth LT 11><cfset subtot2 = subtot2 + 1></cfif> <cfif form.ageNth GT 10><cfset subtot1 = subtot1 + 1></cfif> or get fancy and loop through the formset... or not. At 07:15 PM 3/8/02 -0500, you wrote: >Hello cf-talk, > > I have a form, that collects up to 12 names and ages. > THis is to sell admission tickets, adults are one price and children > another price. > > On the next page, I want to get a subtotal total for the number of people who > are adults, a subtotal for the number of people that are children, > and then a total price. > > Something like: > > Get all ages that are over 11 and multiply that by 60, and that > equals subtotal1. > > Get all ages that are 11 and under and multiply that by 30, and that > equals subtotal2. > > Then, subtotal1+subtotal2=total. > > > I seem to know the idea, but I'm stuck on using the form passed > ages and turning them into values I can seperate into adult/child. > > I can be given form.age1=15, form.age2=10, form.age3=33, > form.age4=null ect. > > I cant seem to put this step together?? > > > >Best regards, > Jeff Fongemie mailto:[EMAIL PROTECTED] > > ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists