Using PHP form on Android
Hello guys, I'm pretty new in developing for Android via Flash and Air. I was used to using Flash on Actionscript 2.0 so now I'm facing some troubles readapting to the new AS3.
I created an app for both desktop and Android which uses a form sent via PHP. On the desktop it's working OK, but on Android no data is sent.
Here is the code used:
submit_btn.addEventListener(MouseEvent.CLICK, sendMessage);
function sendMessage(e:MouseEvent):void
{
var my_vars:URLVariables = new URLVariables();
my_vars.senderName = name_txt.text;
my_vars.senderEmail = email_txt.text;
my_vars.senderPhone = phone_txt.text;
my_vars.senderAge = age_txt.text;
my_vars.senderParent = parent_txt.text;
var my_url:URLRequest = new URLRequest("http://www.trendmc.com.br/yazigi/qrcode/mail.php");
my_url.method = URLRequestMethod.POST;
my_url.data = my_vars;
var my_loader:URLLoader = new URLLoader();
my_loader.dataFormat = URLLoaderDataFormat.VARIABLES;
my_loader.load(my_url);
name_txt.text = "";
email_txt.text = "";
phone_txt.text = "";
age_txt.text = "";
parent_txt.text = "";
message_txt.text = "Registro efetuado";
play()
}
Any ideas where is my mistake?
