System information

15
CHAPTER 2
CFML Basics
This chapter introduces the basic elements of CFML, including how to create Macromedia
ColdFusion pages, and use variables, functions, conditional processing, and form processing.
Contents
Working with ColdFusion pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
About CFML elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Working with CFML expressions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
About conditional processing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Processing form data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Commenting your code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Working with ColdFusion pages
ColdFusion pages are plain text files that you use to create web applications. You can create your
ColdFusion applications by writing all the code manually or by using wizards (provided with
some editors) to generate the majority of the code for you.
You can use the following editors to create your ColdFusion pages:
Macromedia Dreamweaver MX
Macromedia HomeSite+
Macromedia ColdFusion Studio
Any HTML editor
Windows Notepad
Vi or Emacs (UNIX systems)