Because the url.no is always three in your example.  The if statement 
always will dump out after the first conditional, since it is always true.

switch 'em around:

<cfif (url.no IS "3") and (session.permission is "admin")>
        Page Content
<cfelseif url.no IS "3">
        <cflocation url="index.cfm">
</cfif>

Ian Vaughan wrote:
> 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.
> 
> 
> 
> Thanks
> 
> 
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:212296
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

Reply via email to