example of how I do it alot. Just paste it in a template called thispage.cfm
<cfparam name="url.action" default="form">
<cfparam name="form.fname" default="">
<cfparam name="form.lname" default="">
<cfparam name="msg" default="">
<cfif isdefined('form.submitit')>
<cfif Len(trim(form.fname)) is 0>
<cfset msg = "Enter your first name.">
<cfelseif len(trim(form.lname)) is 0>
<cfset msg = "Enter your last name.">
<cfelse>
<!--- do whatever with their info because it was a
success --->
<cfset url.action = "">
</cfif>
</cfif>
<cfoutput>
<cfif url.action is "thanks">
Thank you #form.fname# #form.lname#!
<cfelse>
<cfif len(trim(msg)) gt 0><div style="color:red;">#msg#</div></cfif>
<form name="myform" action="" method="post">
First Name:<br>
<input type="text" value="#form.fname#" name="fname"><br>
<br>
Last Name:<br>
<input type="text" value="#form.lname#" name="lname"><br>
<input type="submit" name="submitit" value="Submit It!">
</form>
</cfif>
</cfoutput>
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.767 / Virus Database: 514 - Release Date: 9/21/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.767 / Virus Database: 514 - Release Date: 9/21/2004
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

