• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Day 9. Enhancing Your Applications with ... > Defining Variables with <CFSET>

Defining Variables with <CFSET>

The second portion of Gargantuan's requested changes is the submission counter in which employees can choose to have their logged calls count toward a prize. When an employee submits new call information to the database, the confirmation message he receives should allow him to add the submitted call to his overall count. At the end of a predetermined period, Gargantuan will reward the employee with the most calls counted.

ColdFusion offers several ways to "count" things, but for the purpose of this illustration, we'll look at just one—the <CFSET> tag. <CFSET> gives the developer the ability to create new variables that aren't defined by queries or form data. Using <CFSET> you can create any variable you'd like, assign any value necessary, and use it anywhere in your template file.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint