ColdFusion® MX: From Static to Dynamic in 10 Steps By Barry Moore
Table of Contents
For any application to be robust and flexible, it must be able to interpret and respond to user input and changing conditions. In this step, we will look at using conditional statements to control the flow of our application. By using conditional statements, we can get our web application do things like the following:
Personalize content for different users
Process different sections of code based on certain conditions
Display or hide information and functions based on a user's identity
Check to make sure a user is logged in to gain access to certain sections of the site
The methods we will examine for controlling program flow are <CFIF> statements, <CFSWITCH> and <CFCASE> statements, and code looping using <CFLOOP>.
After you understand the basics of controlling the flow of your web site and making it smart, you will be well on your way to ColdFusion guru-dom.