> Presumably you are doing something like so...
>
> <cfset session.myvariable = form />
> <cflocation url="foo.cfm" />
>
> I have not tested it, but I am guessing that you are "loosing" the session
> variables because you are creating a _reference_ to the form scope.  When
> you redirect, the form scope is now empty, and therefore, any and all
> references to it will be empty.  To create a session variable that actually
> holds the *value* (rather than the reference), use duplicate().
>
> <cfset session.myvariable = duplicate(form) />
> <cflocation url="foo.cfm" />

This is not how references work. You can safely create a reference to
the form (which is itself just a reference) and when the form goes out
of scope, the reference you subsequently created will still be
available. There's no need to use Duplicate here, and it's
unnecessarily expensive.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsit

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:342173
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to