You could do it in one CFIF

-- OR --

<!--- List of Session Variables to check --->
<CFSET l_SessionVariables = "MyVar1,MyVar2,MyVar3,MyVar4,MyVar5">

<CFSET b_NeedRedirect = "false">
<CFLOOP List="#Variables.l_SessionVariables#" Index="Var">
        <CFIF NOT IsDefined("session.#Variables.Var#")>
                <CFSET b_NeedRedirect = "true">
        </CFIF>
</CFLOOP>

<CFIF b_NeedRedirect>
  <CFLOCATION Url="">
</CFIF>

LoL, probably not worth it.

Billy

-----Original Message-----
From: W Luke [mailto:[EMAIL PROTECTED]]
Sent: September 4, 2001 7:25 PM
To: CF-Talk
Subject: Looping through 5 session vars


Hi,

I need to loop through 5 session variables to check if any one of them
hasn't been defined. (and if so, cflocation the user).

How can I do this?

Thanks

Will
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to