Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form handling...

Status
Not open for further replies.

wazir

Vendor
Jun 3, 2007
2
GB
Hi guys...

just two questions... i need some help creating a form which when submited, first it logs into a file, the sends the user a confirmation email.

I know how to do this with CGI but CF is kinda diffrent. Yes i realize this is a very begginer question, anyone have any links that cover CF form handling well ?

thanks to anyone who can help.

Brad
 
Regarding your question.

I usually logs the information in a database.

All forms require two page. Form and action.

Code for form page :
<cfform action=&quot;createAction.cfm&quot; method=&quot;POST&quot; enablecab=&quot;Yes&quot;>
ID :
<cfinput type=&quot;Text&quot; name=&quot;series&quot;>

<input type=&quot;submit&quot; value=&quot;Submit&quot;>
</cfform>



Codes for Action page :
<Cfquery name=&quot;addSeries&quot; Datasource=&quot;comMart&quot; dbtype=&quot;ODBC&quot;>
Insert INTO Series(Name, BrandID)
Values ('#Form.series#')
</cfquery>


As for the email. It could be on the same page as the action page. The following is how i would sent an email.

<CFMAIL
FROM=&quot;jansen_chiefs@yahoo.com&quot;
TO=&quot;#form.email#&quot;
SUBJECT=&quot;About your id&quot;
>
You have requested for your ID.
<br>
Your ID is #getID.ID#
</cfmail>


Hope this helps..

Jansen
(jansen_chiefs@yahoo.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top