PDA

View Full Version : Question How to make Flash works with PHP to create TXT file?



benazio
06-08-2009, 11:57 AM
so here goes,

the point is, i have created an order form in flash cs3 with actionscript 3.0, and my lecture wants my flash to be working with PHP, so if i click the submit button, my flash will load the PHP file and created a .TXT file in the directory(offline) which includes the information of the order form!

i've already research for this problem, but all i got is a script to send email from a form! i need something that can be working offline to show it to my lecture..

maybe the php script would be something like this example,


<?php
$File = "YourFile.txt";
$Handle = fopen($File, 'w');
$Data = "Jane Doe\n";
fwrite($Handle, $Data);
$Data = "Bilbo Jones\n";
fwrite($Handle, $Data);
print "Data Written";
fclose($Handle);
?>

but i still need help from the master please! :confused: thanks!! i have to collect it tomorrow (GMT+7!) !! :worship:

Jesdisciple
06-08-2009, 02:05 PM
i have created an order form in flash cs3 with actionscript 3.0, and my lecture wants my flash to be working with PHP, so if i click the submit button, my flash will load the PHP file and created a .TXT file in the directory(offline) which includes the information of the order form!This is actually a Flash problem; you need a way to accomplish an AJAX-esque effect (asynchronously query the server) from Flash. The language of the script to be queried is irrelevant for this part of your project; it will be the same ActionScript code.

I don't know Flash, but I recall reading the documentation for a project which did just this with it. It does use the Flash API, but unfortunately not ActionScript; here it is: http://jimbojw.com/wiki/index.php?title=SWFHttpRequest.hx I see you also posted this topic in Flash (http://www.dynamicdrive.com/forums/showthread.php?t=45747), so I hope you get a better answer there.