Results 1 to 1 of 1
Aug 14, 2008, 06:54 #1
- Join Date
- Jul 2008
- 0 Post(s)
- 0 Thread(s)
** Coldfusion Thread - Codes , Help, APIs
I'll be posting some usefull code in this thread for anyone who is looking into coldfusion. This thread can be used for a recource on anything Cold Fusion Related. I'll start by posting very basic stuff. Check back, I'll try and add some posts daily, so if you got questions and comments, post back. I'll be adding some cool stuff eventually like google api integration, image resizing, and jquery integration with coldfusion ..so lets start basic !
Code 1.0 - Re-Usable Sendmail Function.
Code Notes: Name form fields what you want to display before what is evaluated. Put this as your action="" on your normal html form.
<cfoutput> <CFMAIL SERVER="yourserver" FROM="#form.email#" TOfirstname.lastname@example.org SUBJECT="Contact Form From Website!" type="html"> <CFLOOP INDEX="TheField" list="#Form.FieldNames#"> <cfif NOT #TheField# is "SUBMIT">#TheField# - #Evaluate(TheField)#<br /></cfif> </CFLOOP> </CFMAIL> </cfoutput> <cflocation template="/thankyou.cfm">