![]() |
To create a local variable: |
MyFirstPage.cfm
in ColdFusion HomeSite.<CFSET ProductName="ColdFusion">
If you performed the procedures presented in the last chapter, then you already have this variable created.
Ctrl S saves the file.
Your page should look like this:
<HTML> <HEAD> <TITLE>My First Page</TITLE> </HEAD> <BODY> <STRONG>ColdFusion</STRONG> <CFSET ProductName="ColdFusion"> </BODY> </HTML>
http://127.0.0.1/CFDOCS/MyFirstPage.cfm
.Ctrl R refreshes the page in the browser.
The variable is not output to the page; its value is just stored with the page.
You will learn how to output the variable value during the next procedure.
The CFML tag was processed on the server.
Only HTML is returned to the browser.
![]() |
Note: | The CFPARAM tag can also be used to set and initialize variables. Refer to the CFML Language Reference for ColdFusion Express for more information. |
You have created a local variable on your page. Move on in this chapter to learn how to reference a variable on an application page.