O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating an Add Record Form

Forms used to add data are no different from the forms you created to search for data. As seen in Listing 14.1, the form is created using form tags, with a form control for each row table column to be inserted. Save this file as insert1.cfm (in the 14 directory under ows). You’ll be able to execute the page to display the form, but don’t submit it yet (you have yet to create the action page).

Listing 14.1. insert1.cfm—New Movie Form
<!--- Name: insert1.cfm Author: Ben Forta (ben@forta.com) Description: Table row insertion demo Created: 07/01/07 ---> <!--- Get ratings ---> <cfquery datasource="ows" name="ratings"> SELECT RatingID, Rating FROM FilmsRatings ORDER BY RatingID </cfquery> <!--- Page header ---> <cfinclude ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required