Correction on my previous post: The variable was stored in variables.session.name (not variables.session.rick)... but you probably knew what I meant.. ;-)
On Mon, Feb 27, 2012 at 3:39 PM, Steve Milburn <scmilb...@gmail.com> wrote: > You will need an application.cfc (or .cfm) for session variables to work. > > In your example, your <cfset session.name = 'rick'> was actually stored > in the variables scope on that page as variables.session.rick, and not > actually in the session scope. That is why it was not available on the > other page. > > > On Mon, Feb 27, 2012 at 3:28 PM, Rick Faircloth > <r...@whitestonemedia.com>wrote: > >> >> There's no application.cfc at this point...the only >> two pages involved are what's in this email. >> >> Is enabling session management in an application.cfc >> necessary for session management to work? >> >> As you can see below when I use: >> >> <cfset session.name = 'rick'> >> >> and then output that with: >> >> <cfoutput>#session.name#</cfoutput> >> >> I get 'rick'... >> >> But that's on the same page. >> >> Would that work but not session variables between pages >> with session management being enabled in application.cfc? >> >> Rick >> >> -----Original Message----- >> From: Steve Milburn [mailto:scmilb...@gmail.com] >> Sent: Monday, February 27, 2012 3:18 PM >> To: cf-talk >> Subject: Re: Session variables not working >> >> >> Have you enabled session management in the application.cfc? >> >> On Mon, Feb 27, 2012 at 3:14 PM, Rick Faircloth >> <r...@whitestonemedia.com>wrote: >> >> > >> > It's been awhile since I used session variables, >> > but this is simple. Why won't this work? >> > >> > session-test.cfm >> > ---------------- >> > >> > <cfset session.name = 'rick'> >> > >> > <cfoutput>#session.name#</cfoutput> >> > >> > <cflocation url="session-test-2.cfm"> >> > >> > >> > session-test-2.cfm >> > ------------------ >> > >> > <cfoutput>#session.name#</cfoutput> >> > >> > >> > I get the error 'Element NAME is undefined in SESSION.' >> > >> > ??? >> > >> > Session variables are specified for use in CFADMIN. >> > Am I missing something REALLY simple or obvious? >> > >> > Rick >> > >> > >> > >> > >> >> >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350117 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm