Groups | Blog | Home
all groups > flash data integration > august 2005 >

flash data integration : How to Post data to DB


Lab
8/30/2005 12:00:00 AM
It's not a problem to read data from MySQL db using PHP and XML to view it
in Flash,
but how to get the data from Flash and send it to php file that will store
in the database?

Previously I used to work only with HTML / PHP / MySQL, but now I've no idea
how to make the same form submition thing in Flash..

Thanks,
lab

Wilson
8/31/2005 6:27:09 PM
Simple,

Flash:

on (release){
my_var_1_in_flash = "Value1";
my_var_2_in_flash = _root.my_var2;
.......
loadVariablesNum
("http://www.myserver/pastePhp/file_in_my_server.php","","POST");
}

PHP (file_in_my_server.php):

$my_var1_local_php = $_POST[my_var_1_in_flash];
$my_var2_local_php = $_POST[my_var_2_in_flash ];

$conect_database(..... )

$Sql = "INSERT INTO table_Db
('".$my_var1_local_php."','".$my_var2_local_php.'")";

--------------------
Ok?

Att

Wilson Francisco Eugenio
Brazil

AddThis Social Bookmark Button