Category Archive for: Getting Data From a Database


Now that you know how to use variables in your ColdFusion templates you need to consider how to leverage them in different ways including using functions and by .leveraging the power of expressions. In this chapter you will focus on the latter: functions. Functions are common to many programming languages and provide a way to isolate programming…

Read More →

Validating Form Input

In this final section of the chapter, you will add one last piece of code to your home. cfm template. This code will determine whether the user has selected a radio button. If the user wants to score their quiz they must select one of the answer radio buttons. Otherwise they will be redirected to start the…

Read More →

Creating Dynamic SQL

In this section, you will add functionality to your quiz application that will enable the user to retake a quiz question if they gave the incorrect response. Here is the process that will occur 1. A user goes to the home. cfm page and answers a quiz question. 2.On the quiz_resul ts. cfm page, they are informed…

Read More →

Generating Random Results

Currently, your quiz application retrieves and displays all questions entered in the database. If you had 50 questions, all 50 cold be displayed to the user on the home. cfm template. In this section, you will learn how to display one randomly generated question from all the questions available in the database. In the preceding section, you learned…

Read More →

Querying a Database

Remember that in the preceding chapter you created a quiz with two questions. The user’s answers as well as the correct answers were then passed through form fields. However any user could look at the source of the home. cfm file and view the correct answers by looking at the hidden form fields. One way to solve that…

Read More →

Getting Data From a Database

The true power behind ColdFusion is its capability to access and manipulate database records. In this chapter  learn how to access a database using ColdFusion and basic Structured Querv Language (SQU k1 retrieve information from a database.You will be working with a Microsoft Access 97 database provided on the CD that comes with this book. It is not…

Read More →

Back to Top