Hello,
I'm trying to set up a newsletter, sending some variables to a PHP
script in AS3. The problem is that one of the variable Name/IDs has
brackets [] in it and flash does not like this, so I've put the variable
in the URLRequest - but it doesn't work either. I'm interested if
anyone has any ideas in how to pass this variable to the PHP file.
Should I put "group_ids[]=2" in a text file and load that text file in
the flash and then pass it to the PHP with the other variables? If so,
ideas in how? Thanks for any help.
-Nick
Here's the code I have so far:
var variables:URLVariables = new URLVariables();
var varSend:URLRequest = new
URLRequest("manage/public/listmessenger.php?group_ids[]=2");
//var varSend:URLRequest = new
URLRequest("manage/public/listmessenger.php");
var varLoader:URLLoader = new URLLoader;
varSend.method = URLRequestMethod.POST;
varSend.data = variables;
emailSubmit.addEventListener(MouseEvent.CLICK, sendActions);
varLoader.addEventListener(Event.COMPLETE, loadComplete);
function sendActions(event:MouseEvent):void {
variables.email_address = email_txt.text;
variables.action = String('subscribe');
//variables.group_ids[] = String('2');
varLoader.load(varSend);
trace(variables.email_address);
trace(variables.action);
}
function loadComplete(event:Event) {
trace("Your message was sent.");
}
--
Nick Terry
Designer
[EMAIL PROTECTED] | www.nickterry.com
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders