How do I get choice between two url.locations in script?
I want to have a select statement take me to one page if the Type 2 is selected, and a different page if Type 1. I've tried what follows, but it just goes to the last cflocation url listed. Is there a way to actually have the if/else work so if it's "2" it goes to rinfo2.cfm and if "1" or anything else, it goes to rfino1.cfm?
- - - - - - -
THIS WORKS BUT DOESN'T GIVE ME THE CHOICE I WANT.
<cfif isDefined("URL.type")>
<cfquery name="rsFindType" datasource="holly">
select * from rcontacts10 where type="2"
</cfquery>
<cflocation url="rinfo2.cfm">
<cfelse>
<cfquery name="rsFindAllTypes" datasource="holly">
select * from rcontacts10
</cfquery>
<cflocation url="rinfo1.cfm">
</cfif>
- - - -
Thanks!
