Hi there!
when I load vars from my php file the spotsNum var that is loaded is “.$i” instead of 2.
The php file is
<?php
$i = 2;
echo “&spotsNum=”.$i."&successMessage=ok&end=end";
?>
And at the flash file
function submitToPHP()
{
var variables:URLVariables=new URLVariables;
var request:URLRequest=new URLRequest;
request.url=“sendvars2.php”;
request.method=URLRequestMethod.POST;
request.data=variables;
var loader:URLLoader=new URLLoader(request);
loader.dataFormat=URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE,completeHandler);
try
{
loader.load(request);
trace("sending");
}
catch (error:Error)
{
trace(error.message);
trace("unable");
}
}
function completeHandler(event:Event):void
{
trace(event.target.data.spotsNum);
}
Can anybody help?
Thanks