Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | re:FLASH:Saving Variables to a database |
From: | John Stanley |
Date: | Wed, 19 Jul 2000 11:33:30 +0100 |
Here is a template i am using to write variables passed to a cf-template
from a flash movie. It is also attached. (In the attached version the query
is commented out because I do not want it writing to the database at this
time.)
This template writes to a database as well as emails the requester and the
internal contact here. It does not require the use of URL, or Form Prefixes
to work.
Hope this helps. Any questions, please let me know.
<<enterform.cfm>>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<cfparam name="title" default="No Information given">
<cfparam name="name" default="">
<cfparam name="email" default="">
<cfparam name="address" default="No Information given">
<cfparam name="city" default="No Information given">
<cfparam name="state" default="No Information given">
<cfparam name="zip" default="No Information given">
<cfparam name="phone" default="No Information given">
<cfparam name="fax" default="No Information given">
<cfparam name="organization" default="">
<cfparam name="selected" default="No Information given">
<cfset error='false'>
<cfif isDefined("Name") and #len(name)# GT 0>
<cfelse>
<cfset error='true'>
</cfif>
<cfif isDefined("Organization") and #len(Organization)# GT 0>
<cfelse>
<cfset error='true'>
</cfif>
<cfif isDefined("Email") and #len(EMail)# GT 0>
<cfelse>
<cfset error='true'>
</cfif>
<cfif #error# eq 'true'>
<script>
location = 'request_error.cfm?'
</script>
<cfelse>
<cfquery name="write_data" datasource="homepage">
Insert into Contacts (FirstName3, Title1, Company, Email1, Phone, Fax,
Address, City, State, Zip, MarketSegment)
Values
('#Name#','#Title#','#organization#','#email#','#phone#','#fax#','#address#'
,'#city#',
'#state#','#zip#','#selected#')
</cfquery>
<cfmail to="AdminCentromine [dot] com" from="#form.email#" subject="Show of the
year -- Automated mail" >
The following information was added to the contact database via show of the
year.com
Name :#Name#
Title: #Title#
Organization: #organization#
E-Mail: #email#
Phone: #phone#
Fax: #fax#
Address: #address#
City: #city#
State: #state#
Zip: #zip#
Market Segment: #selected#
</cfmail>
<cfmail to="#email#" from="System" subject="Show of the year -- Automated
mail" >
The following information was sent per your request:
Name :#Name#
Title: #Title#
Organization: #organization#
E-Mail: #email#
Phone: #phone#
Fax: #fax#
Address: #address#
City: #city#
State: #state#
Zip: #zip#
Market Segment: #selected#
Thanks for submitting your request.
</cfmail>
<br>
<div align="center">
<img src="images/logo.jpg" width="497" height="89" border="0" alt="">
<br>
<br>
<br>
<font face="arial"><h2>Transmitting Request</h2></font>
</div>
<script>
function send() {
document.location='test.cfm';
}
window.setTimeout(send,3000);
</script>
</cfif>
</body>
</html>
John Stanley
Programmer
Internet Visions Group
734.352.2136
Centromine, Inc
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
www.flashforward2000.com
Produced by United Digital Artists and lynda.com
Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
shockwave.com and Electric Rain.
1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
Register before June 30 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]