Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / March 2005



Tip: Looking for answers? Try searching our database.

Help with inserting record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ShivaElliott - 25 Mar 2005 22:11 GMT
So I've been looking all over these forums, and all over the internet on some
kind of tutorial that will explain what I need to do to just insert a record
into a database using a Flash form.  I know it's certainly possible, but I
haven't seen anything that just deals with "I built a form in Flash.  I want
users to fill it out, and then have the fields they fill out populate my
database.  That is all."
I don't care about updating this information, I don't care about displaying
this information, I just want it to fill in the fields of a database.  I feel
like its something really easy, but somehow I'm just not getting it.  Can
anyone give me a quick explanation/tutorial on this?
s0mus - 27 Mar 2005 18:33 GMT
<cfif IsDefined("Form.val1")>

<CFQUERY NAME="queryname" DATASOURCE="datasource">
insert into tablename (col1,col2,clo3,clo4)
values ('#Form.val1#','#Form.val2#','#form.val3#','#Form.val4#');
</CFQUERY>

<cfelse>
Values not sent correctly
</cfif>
s0mus - 27 Mar 2005 18:44 GMT
First line checks to make sure that a essential value exists, if so, go to next
line.  Just to make sure that this page is not being misused we ask it to
accept only form variables containing a vaule that you specify.

Next line, query name, doesn?t matter
datasource, your datasource as defined in your datasource section of the
Administrator

Next line, insert into your table then list the columns
Next line, list your values to insert that correspond to the columns just
mentioned.  The #form. Indicates that they are from a form which passes those
named fields.  Use the ; to terminate the SQL statement.
End cfinsert

Next line, refers to the first line. If the essential value is missing print:
Values not sent correctly
End
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.