The application.cfm runs before every page and resets your variable
session.dog. Just set the value of that session variable in your code
somewhere other than the application.cfm and it should work. I hope this
helps. 


-----Original Message-----
From: Kronenberger, Douglas [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 9:50 AM
To: CF-Talk
Subject: Session Variables - I don't get it


Greetings,

I'm not getting how to implement session variables. I'm just trying to set
the session variable "Session.Dog" from black to Blue and have it show up as
Blue on the test.cfm. It keep show'n up black. I do have Session Variables
enabled via the CF Administrator page.

What am I miss'n here.

<!--- Application.CFM --->

<cfapplication name="TEST" sessionmanagement="Yes" setclientcookies="no">

<cflock scope="session" timeout="2">
<cfset  Session.Dog = "Black">
</cflock>


<!--- Test.CFM  --->
<html>

<body>
<cflock scope="session" timeout="2">
<cfoutput> #Session.Dog# </cfoutput>
<cfset  #Session.Dog# = "Blue"><br>
</cflock>


<cflock scope="session" type="readonly" timeout="2">
<a href="test2.cfm?<cfoutput>#Session.URLTOKEN#</cfoutput>" > Goto</a><br>
</cflock>

</body>
</html>

<!--- Test2.CFM  --->
<html>

<body>
<cflock scope="session" timeout="2">
<cfoutput> #Session.Dog# </cfoutput> 
</cflock>
<br>

</body>
</html>
-----------------------------------------------------------------


Can someone get me started here. 

Thanks

> Doug Kronenberger
> OI National Training and Education Office
> 440-526-3030 x7776
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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