<!---
Name:        edit2.cfm
Author:      Ben Forta (ben@forta.com)
Description: Dual purpose form demo
Created:     4/20/01
--->

<CFSET EditMode=IsDefined("FORM.FilmID")>

<CFIF EditMode>
    <!--- Update movie --->
    <CFUPDATE DATASOURCE="ows" TABLENAME="Films">
    <CFSET action="updated">
<CFELSE>
    <!--- Add movie --->
    <CFINSERT DATASOURCE="ows" TABLENAME="Films">
    <CFSET action="added">
</CFIF>

<!--- Page header --->
<CFINCLUDE TEMPLATE="header.cfm">

<!--- Feedback --->
<CFOUTPUT>
<H1>Movie #FORM.MovieTitle# #action#</H1>
</CFOUTPUT>

<!--- Page footer --->
<CFINCLUDE TEMPLATE="footer.cfm">

