Outputting the Data in th218 Page
When it loads, dante_quiz_results.cfm now has two variables available in its URL (that is, as a querystring). In this task, you'll output those two variables into th218 page.
1. | In Dreamweaver, open dante_quiz_results.cfm. |
The other pages of the site are finished, so this is the last page you'll need to work on. It needs to accomplish two things: provide feedback, in the form of a quiz score, to the user; and insert a new record into the database.
2. | Replace the placeholder text with the following. Link the word "Return" to index.cfm. Make both sets of "XXX"s bold. |
Thank you for taking the quiz, XXX Your score is: XXX out of 5. Return to the Dante site home page. As you probably guessed, XXX is just placeholder text, which you'll soon replace with dynamic data.[View full size image]

3. | In the Bindings panel, click the New Binding (+) button to create two new URL variables: username and score. |
Creating bindings notifies Dreamweaver that this data will be available to the page, but creating bindings does not actually change any code in the page. Creating bindings makes it easy to insert dynamic data in a page so you can output it.

4. | Select the first set of "XXX"s in the Document window. In the URL category of the Bindings panel, click to select username. Click the Insert button at the bottom of the panel. |
Dreamweaver writes the code necessary to enable ColdFusion to output the value of the URL variable username i227 code. As you probably guessed, Dreamweaver inserted a <cfoutput> tag.
5. | Repeat Step 4 to insert the URL.score variable in the second set of "XXX"s. Save and upload dante_quiz_results.cfm. |
The page is now set to output both variables from Flash. You're ready to test the page.[View full size image]

6. | In the Files panel, select dante_quiz_login.cfm and press F12 (Windows) or Option+F12 (Macintosh). Enter an email address and take the quiz. |
When you're finished taking the quiz, the email address you entered in the form two pages ago, as well as your score, are output.[View full size image]
