Using Session Variables

Now that you've learned the basics of client variables, session variables will be a breeze.

As their name implies, session variables stick around only as long as a user's session lasts. When the user leaves your application pages, the session variables vanish into the ether. However, they're still extremely valuable tools for storing data that doesn't necessarily need to be permanently saved as client data.

Suppose that Crazy Eddie has added several "featured products of the week" to his site. He wants to offer different products to different customers, based on information they supplied during registration. For example, someone who said his hobby was "cars" would see Eddie's custom chain steering wheel as the featured ...

Get Sams Teach Yourself ColdFusion® in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.