Yeah, I had a brain fart. This fixed it:

 <cfsetting showdebugoutput=false>
 <!--- Set the orgname to blank first --->
<cfparam name="form.orgname" default="">

<!--- Query the organizations table for all of the org names --->
<cfquery name="checkName" datasource="#request.dataSource#">
   SELECT orgname, orglongname
   FROM organizations
   WHERE orgname = <cfqueryparam value="#form.orgname#" 
cfsqltype="cf_sql_varchar"> OR orglongname = <cfqueryparam 
value="#form.orgname#" cfsqltype="cf_sql_varchar">

</cfquery>

<!--- Check the list against the name entered. If there is a match, then code 
is valid, otherwise code is invalid --->

<cfif LEN(checkName.orgname) OR LEN(checkName.orglongname)>

<cfset available = '<span style="color: Green;">Code is valid.</span>'>
<cfelse>
<cfset available = '<span style="color: red;">The Code <b> #orgname#</b> is an 
invalid code. Please re-enter your code.</span>'>
</cfif>
<cfoutput>#available#</cfoutput> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354492
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to