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