I am using ColdFusion to implement a shopping cart. I have a form to collect
name and address and the next page places these values in the database.
(rather, is SUPPOSED to place them in a database)Below is the code for getting
data from the form and placing data into the database.
Thank you in advance for any help!
<CFOUTPUT>
<CFSET SHOPPING=STRUCTNEW()>
<CFSET SHOPPING.NAME=#FORM.NAME#>
<CFSET SHOPPING.ADDRESS=#FORM.ADDRESS#>
<CFSET SHOPPING.CITY=#FORM.CITY#>
<CFSET SHOPPING.STATE=#FORM.STATE#>
<CFSET SHOPPING.ZIP=#FORM.ZIP#>
<CFSET SHOPPING.HOME_PHONE=#FORM.HOME_PHONE#>
<CFSET SHOPPING.EMAIL=#FORM.EMAIL#>
<CFIF LEN(#FORM.BPHONE#) EQ 0>
<CFSET BPHONE = "Not Applicable">
<CFELSE>
<CFSET BPHONE = "#FORM.BPHONE#">
</cfif>
<CFQUERY DATASOURCE="LIGHT2">
INSERT INTO TEMP_SHOPPING_CART
(NAME,ADDRESS,CITY,STATE,ZIP,HOME_PHONE,BPHONE,EMAIL)
VALUES
('#NAME#','#ADDRESS#','#CITY#','#STATE#','#ZIP#','#HOME_PHONE#','#BPHONE#','#EMAIL#')
</CFQUERY>
</CFOUTPUT>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:15:865
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54