Okay...
I looked over the emails that my client has gotten and picked out a few key
phrases that would never appear in a normal contact form and dropped them
into a variable. Then I loop over both the form field and the badterms list
and if I find anything then I cancel the processing. Might be a little
overkill, but this way I check all the fields. Here's the code if anyone
wants it:
<!--- list of no-no terms --->
<cfset VARIABLES.valid = 1>
<cfset VARIABLES.badterms =
"MIME-Version,Content-Type,bcc:,Content-Transfer-Encoding,text/plain">
<!--- loop over form fields and see if there's any crap in them --->
<cfloop index="field" list="#FORM.fieldnames#">
<!--- loop over bad terms on this form field --->
<cfloop index="term" list="#VARIABLES.badterms#">
<!--- if there's crap in the form field then cancel the loop
and break
out --->
<cfif FindNoCase(term,Evaluate("FORM."&field))>
<cfset VARIABLES.valid = 0>
<cfbreak>
</cfif>
</cfloop>
<!--- if there's crap in the form field then cancel the loop and break
out --->
<cfif NOT VARIABLES.valid>
<cfbreak>
</cfif>
</cfloop>
<cfif VARIABLES.valid>
process form here
</cfif>
<!----------------//------
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226218
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54