Look into using the LoadVars sendAndLoad method, here is s quick sample.
//create LoadVars Variables
var result_lv:LoadVars = new LoadVars();
var send_lv:LoadVars = new LoadVars();
//this is what you want to send to the PHP file
send_lv.YOUR_FORMFIELDNAME = "Whatever_You_Need_To_Send";
//this is where the items are returned from php file
result_lv.onLoad = function(success:Boolean) {
if (success) {
trace(this.return_info_01);
trace(this.return_info_02);
trace(this.return_info_03);
}
//this sends the information to the PHP file, you can also use the GET method
send_lv.sendAndLoad("http://www.website/your_php_file.php", result_lv, "POST");
YOUR PHP FILE SHOULD RECEIVE AND RETURN THIS FORMAT
<?php
//retrieve infor from flash using POST method
$myVar = $_POST['YOUR_FORMFIELDNAME'];
//any processing code you need to do.
echo "&return_info_01=" . urlencode("send_to_flash_01") . "&return_info_02=" . urlencode("send_to_flash_02") . "&return_info_03=" . urlencode("send_to_flash_03");
?>
//warning: any extra return carriages here will be added to the end of the return string
mike
|