Why not use a switch/case to catch that url param and then inside case 3 put the logic you need for that specific incident.
my 2 cents On 7/20/05, Ian Vaughan <[EMAIL PROTECTED]> wrote: > However > > The cfif url.no IS 3 etc displays dynamic content out of the database > based on the url.no=. > > So for example > > http://sitename/test.cfm?no=3 > > Would bring back the content ' NEWS' > > While > > http://sitename/test.cfm?no=2 > > Would bring back the content 'BUSINESS' > > > So I need the cfif statement to display the content as normal if the > url.no is 1 or 2 or 4 etc.. > > > But if it is url.no=3 then apply the logic so that if a user has not > logged in and they do not have a session.permission is "admin" then use > cflocation back to the index.cfm page > > -----Original Message----- > From: Larry Lyons [mailto:[EMAIL PROTECTED] > Sent: 20 July 2005 15:01 > To: CF-Talk > Subject: CFIF logic problem > > >Hi > > > > > >Is my logic correct in the code below ? > > > > > ><cfif url.no IS "3"> > ><cflocation url="index.cfm"> > ><cfelseif (url.no IS "3") and (session.permission is "admin")> > > > >Page Content > > > ><cfelse> > ></cfif> > > > >What I want is if the url is http://sitename/test.cfm?no=3 > > > >Then it will transfer back to the index.cfm page. > > > >However if the url is http://sitename/test.cfm?no=3 and the > >session.permission has been set to 'admin' from the user login then the > > >page content displays. > > > >At present however the page keeps redirecting to the index.cfm page. > > > > You may want to break up the CFIF into something like this: > > <cfif url.no IS "3"> > <cfif session.permission is "admin"> > Page Content > <cfelse> > <cflocation url="index.cfm"> > </cfif> > </cfif> > > hth, > > larry > > -- > Larry C. Lyons > Web Analyst > BEI Resources > American Type Culture Collection > email: llyons(at)atcc(dot)org > tel: 703.365.2700.2678 > -- > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212316 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

