September 2007
Intermediate to advanced
600 pages
20h 21m
English
Populating an HTML form is a simple process. First, you must retrieve the row to be updated from the table. You do this with a standard <cfquery>; the retrieved values are then passed as attributes to the HTML form.
Listing 14.9 contains the code for update1.cfm, a template that updates a movie. Save it as update1.cfm, and then execute it. Be sure to append the FilmID—for example, ?FilmID=13—as a URL parameter. Your screen should look like Figure 14.4.
<!--- Name: update1.cfm Author: Ben Forta (ben@forta.com) Description: Table row update demo Created: 07/01/07 ---> <!--- Check that FilmID was provided ---> <cfif NOT IsDefined("URL.FilmID")> <h1>You did not specify the FilmID</h1> ... |
Read now
Unlock full access