During this chapter you learned:
- About the different variables that you can use to perform dynamic page processing
- How to create a local variable and assign it a value using the CFSET tag
- How to reference a ColdFusion local variable for output to a page using the CFOUTPUT tag
- How to reference CGI variables
- How to create and reference cookie variables
When creating and referencing variables in ColdFusion applications, keep these guidelines in mind:
- Variable names should be all one word and begin with a letter.
- Variable names can contain only letters, numbers and the underscore.
- Variable names should not contain special characters.
- ColdFusion variables are not case-sensitive but use a consistent capitalization scheme.
- Always use double quotes (") to surround a value when assigning a value to a variable name.
- Always surround a variable name with pound signs (#) when referencing the variable to use its current value.
- Prefix variable names with variable type to ensure that ColdFusion references the correct variable during processing.
Where to go from here
- Move on to the next chapter to learn how to query a database and work with query variables.