session level variables

Thread Solved
Reply

Join Date: Jan 2009
Posts: 4
Reputation: thesaintbug is an unknown quantity at this point 
Solved Threads: 0
thesaintbug thesaintbug is offline Offline
Newbie Poster

session level variables

 
0
  #1
Jan 7th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 20
Reputation: jedimatt is an unknown quantity at this point 
Solved Threads: 1
jedimatt jedimatt is offline Offline
Newbie Poster

Re: session level variables

 
0
  #2
Jan 7th, 2009
Hi,

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

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

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

Jedimatt
Last edited by peter_budo; Jan 8th, 2009 at 9:38 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 4
Reputation: thesaintbug is an unknown quantity at this point 
Solved Threads: 0
thesaintbug thesaintbug is offline Offline
Newbie Poster

Re: session level variables

 
0
  #3
Jan 9th, 2009
ok... thanku so much... It really helped me
now I am able to do what i was wanting to do...
thnx
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ColdFusion Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC