Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash Database

Status
Not open for further replies.

crazybeans128

Programmer
Aug 5, 2003
79
US
Alright, I need to be able to fill out a form in Flash and have it export to a spreadsheet for later reference. Does anyone know how to do this?

Thanks in advance
 
Well, Flash does not directly interact with databases. What you would do is have Flash submit the form to a server-side script (such as with ASP, PHP or ColdFusion) and that script would be in charge of communicating with a database.

But to get Flash to pass variables to a script:
(SAMPLE ONLY)

Code:
form_data = new LoadVars();
form_data.firstname = firstname;
form_data.lastname = lastname;
form_data.comments = comments;

form_data_reply = new LoadVars();
form_data_reply.onSend = function(success) {
   trace(success?"OK":"Failed");
}

form_data.sendAndLoad("feedback_submit.php",form_data_reply,"GET");

When this script is executed, it sends a HTTP request such as
feedback_submit.php?firstname=John&lastname=Doe&comments=Your+website+kicks+ass%21

For information about using PHP for server-side scripting, take a look at forum434.

I REALLY hope that helps.
Will
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top