DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   ColdFusion (http://www.daniweb.com/forums/forum19.html)
-   -   session level variables (http://www.daniweb.com/forums/thread166752.html)

thesaintbug Jan 7th, 2009 8:04 am
session level variables
 
hi,
I am new to Cold fusion...
I have defined a session level variable in one page1.cfm as follows
<cfset session.testing = "test">
and when I am trying to access it on another page page2.cfm (browser window is not closed meanwhile) it gives an error that "testing" is undefined at page2.cfm. Can someone plz explain why is that so... n help me how can i do this... as i need to access testing on page2.cfm...

thnx in advance

jedimatt Jan 7th, 2009 5:20 pm
Re: session level variables
 
Hi,

To enable session variables on your pages you need to define the following at the top of each page:

<cfapplication name="Your application Name" 
sessionmanagement="Yes"
sessiontimeout=#CreateTimeSpan(0,0,45,0)#>

You should then be able to access your session variables that you define.

Jedimatt

thesaintbug Jan 9th, 2009 3:06 am
Re: session level variables
 
ok... thanku so much... It really helped me
now I am able to do what i was wanting to do...
thnx


All times are GMT -4. The time now is 2:17 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC