You need to this instead inside your loop, <cfset session[thisKey] = "">
or even better <cfset structDelete(session,thisKey)> Don't forget that if you are running on cf5 (or lower) you will need cflock tags. ======================================================================== === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email : [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: Jason Miller [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 05, 2003 12:28 AM > To: CF-Talk > Subject: Purging Session Vars > > > Hello Everyone.. > I am having a bit of trouble with purging some session variables... > > I have in the application.cfm an application(obviously) that > is set to > hang on to the session for 20 minutes.... > > BUT if someone finishes a certain step on the form.. I want > to write a > few into a cookie and loop through and purge them... > > I decided that I can just overwrite them - set them to "" using > something like this... > <cfcookie name="LitReq1a" value="#session.fname#, #session.lname#, > #session.company#, #session.email#" expires="NEVER"> > <CFLOOP COLLECTION="#session#" ITEM="ThisKey"> > <CFOUTPUT><cfset session.ThisKey=""> > cfset session.#ThisKey#=""<br></CFOUTPUT> > </CFLOOP> > > While it outputs > <snip> > cfset session.CFTOKEN="" > cfset session.COMMENTS="" > cfset session.COMPANY="" > cfset session.CONTACTBY="" > cfset session.EMAIL="" > etc etc etc > </snip> > > I go visit the first page of my form and the vars do indeed > still exist. > What is the right way to purge these session vars ??? > > My application code is as such... > <cfapplication name="LitReq" > setclientcookies="Yes" > sessionmanagement="Yes" > > sessiontimeout="#createTimeSpan(0,0,20,0)#"> > > hope this was clear.. Thanks in advance! > jay > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

