Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q3004 How can I delete session variables from my application?

You are here: irt.org | FAQ | ColdFusion | Q3004 [ previous next ]

ColdFusion 4.0 includes the new concept of structures. Structures can be used for managing lists of key-value pairs. The Session object is actually a built-in structure, so all of the structure-related functions can be used on it.

Suppose we have the variable SESSION.AccountID. The following code would delete the session variable.

<cfset tempvariable = StructDelete(session,"AccountID")>

To clear the data from all current session variables, you can use the StructClear() function:

<cfset tempvariable = StructClear(session)>

Feedback on 'Q3004 How can I delete session variables from my application?'

©2018 Martin Webb