Hi,
I am unable to get the data from the php using AS 2.0/FL 3.0 code.
The AS code reads as:
result_lv = new LoadVars();
result_lv.num1 = 12;
result_lv.num2 = 34;
result_lv.onLoad = function (success)
{
if (success)
{
trace("Return value from the PHP : " + unescape(this));
}
else
{
trace("Cannot call the PHP file...");
}
}
result_lv.sendAndLoad("addPHP.php", result_lv, "POST");
And the 'addPHP.php' contains:
<?php
$fVar1 = $_POST['num1'];
$fVar2 = $_POST['num2'];
$rtnValue = $fVar1 + $fVar2;
echo $rtnValue;
?>
I get the following as output when I trace the return from php using 'trace("Return value from the PHP : " + unescape(this));':
Return value from the PHP : <?php
$fVar1 = $_POST['num1'];
$fVar2 = $_POST['num2'];
$rtnValue = $fVar1 $fVar2;
echo "supriya";
?>&onLoad=[type Function]&num2=34&num1=12
Though, everthing is fine with the php. I am able to see the execution through the web browser.
Regards,
Supriya Tenany




