Commenting your code
29
In order for the form page to find its corresponding action page, the action statement in the form
tag must be correct. The form tag includes the information that tells the server where to send the
data that it collects. It also tells the server how to send it. To processes these instructions to the
server, the form tag uses the following syntax:
<form action="actionpagename.cfm" method="Post">
HTML and CFML form tags
</form>
The first attribute (
action
) in the form tag lets you specify where to send the data. The page that
you specify where to send the data is the name of the action page. The second attribute in the
form tag is
method
. The only method that ColdFusion supports is
post
. All ColdFusion forms
must set the method attribute to
post
.
In Part II of this book, you will use ColdFusion form tags to create forms and write collected
values to a database.
Commenting your code
As in other programming languages, it is important to include comments in the code. You should
comment your code for the following reasons:
•
Commented code is easier to debug than code that is not commented.
•
If you describe the code on the page, it is easier to make modifications.
•
Commented code tends to be better organized.
Comment tag
The ColdFusion comment tag is similar to the HTML comment tag, except that it has three
dashes instead of two:
<!--- This is a CFML comment --- >
ColdFusion comments are not returned to the browser because the ColdFusion server processes
and omits the comments from the page. The user will never be able to read your comments.
Summary of Contents for COLDFUSION MX 61-GETTING STARTED BUILDING COLDFUSION...
Page 1: ...Getting Started Building ColdFusion MX Applications...
Page 6: ...6 Contents...
Page 10: ......
Page 30: ...30 Chapter 2 CFML Basics...
Page 36: ...36 Chapter 3 Database Fundamentals...
Page 48: ......
Page 76: ...76 Chapter 6 Lesson 2 Writing Your First ColdFusion Application...
Page 134: ...134 Index...