As I'm sure 100 people on this list will tell you due to the horrendous lag,
when cflocation is used on a page when cookies are being set, the cookies
will not be set correctly.

Instead, I use javascript to relocate....window.location='whatever.cfm';
----- Original Message -----
From: "Mike Sprague" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, April 16, 2001 10:25 AM
Subject: cookies not being set


> I have a login page that checks my db to validate user info and if valid
uses cflocation to redirect to the appropriate page.  I need cookies to work
because people with AOL have been having problems keeing the session
variables alive.  My code is below, any help would be greatly appreciated.
>
> Mike
>
>
> <cfif CheckLogin.RecordCount Is 0 Or CheckLogin.RecordCount GT 1>
>   <cfset Session.error_message="Your Login Information Is Incorrect.
Please Try Again.">
>   <cflocation url="/login.cfm" addtoken="No">
> <cfelseif CheckLogin.RecordCount Is 1>
>   <cfcookie name="UserLevel" value="#int(CheckLogin.UserLevel)#"
expires="1">
>   <cfcookie name="LoggedIn" value="true" expires="1">
>   <cfcookie name="Username" value="#CheckLogin.Username#" expires="1">
>   <cfcookie name="UserID" value="#int(CheckLogin.UserID)#" expires="1">
>   <cflocation url="/members/index.cfm" addtoken="Yes">
> <cfelse>
>   <cflocation url="/login.cfm" addtoken="No">
> </cfif>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to