if it's only 5, then I'd do CFIF blocks with the IsDefined function.  If
it's not defined, set a Redirect Flag.

then at the end, if the flag is true, do the cflocation.

Setting up a loop through the Session vars would catch ALL session vars.
Even if you were to do the loop, and check only those that matched the name
you gave it, then you're still doing a flag condition like above (although
you'd probably be using a CFSWITCH in the loop, but still need to code 5
conditions).

On the other hand, if you have put those variables into a structure, and
saved that structure as a session variable, then you can loop through the
structure rather quick.  But this depends on if you had done it this way,
and how much work you're willing to put into changing your pages.

HTH

Shawn Grover

-----Original Message-----
From: W Luke [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 04, 2001 5: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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to