Problem lies in that url.no is alway 3 and it will process the first line.

Do this...

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

Page Content

<cfelse>
</cfif>


You have to add the not admin to give it a reason to go to the next line.

Of course I don't know the rest of your code so an isDefined may be in 
order on the first line along with some val'ing and trimming.


J.J. Merrick


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:212297
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