![]() ![]() ![]() |
||
|
In this exercise, you develop an action page that you will eventually use to insert or update trip data passed from the Trip Edit page into the trips table of the Compass Travel database.
<html> <head> <title>Trip Maintenance Confirmation</title> </head> <body> <h1>Trip Added</h1> <!--- Database insert logic goes here. ---> <cfoutput> You have added #Form.TripName# to the trips database. </cfoutput> </body> </html>
The message "You have added 12345 to the trips database." appears. The tripeditaction.cfm page does not actually update the database yet; it simply displays a message saying that you added the trip to the database. Before you add the code to allow updates to the database, you must add the logic to validate the data entered in the form.
The following table describes the code that you use to verify whether a file exists:
Code |
Explanation |
---|---|
<h1>Trip Added</h1> <!--- Database insert logic goes here. ---> <cfoutput>You have added #Form.TripName# to the trips database. </cfoutput> |
Displays the heading "Trip Added." Displays the message "You have added TripName to the trips database," where TripName is the trip name you entered in the forms Trip Name field. |
|
||
![]() ![]() ![]() |