> If I understand you correctly, you want the second version of your SQL
> statement to happen only if the user selects a category, otherwise use the
> first.
OK well I've uses your idea but have come across a really irritating
problem. Obviously this select is only on the 2nd page, but the error is
"the specified form object cannot be found" - why? It's there, it's
specified, why can't it see it?!
I'm sorry I'm being so dumb..here's my code:
<cfquery name="County" datasource="localads" >
SELECT county FROM locations
</cfquery>
<form name="area" method="post" action="categories2.cfm">
<select name="area">
<cfloop query="County">
<option
value="<cfoutput>#County.county#</cfoutput>"><cfoutput>#County.county#</cfou
tput></option>
</cfloop>
</select>
<input type="submit" name="Submit" value="Submit">
</form>
<cfquery name="category" datasource="localads" >
SELECT * FROM categories WHERE id = 1
<cfif #form.area# is not "">
AND county is '#form.area#'
</cfif>
Seems fine to my eyes :(
TIA
Will
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.