1 Reply Latest reply on Nov 16, 2008 7:44 PM by atta707

    send array via HTTPService

      Hello, within Flex, I have an associative array with many entries.
      I want to send this array to a PHP script via HTTPService.
      What is the best way to do this using <mx:request> ?

      thanks for any help.
        • 1. Re: send array via HTTPService
          atta707 Level 2
          CRE, LGC, MEM are the checkboxes, could be anything, i check their checked status and add them to an array. in the last step I add the array to the object as dynamic property and submit give the object reference to HTTP Service:

          var o:Object = new Object();
          var submodels:Array = new Array();

          if (this.CRE.selected) submodels.push(this.CRE.id);
          if (this.LGC.selected) submodels.push(this.LGC.id);
          if (this.MEM.selected) submodels.push(this.MEM.id);

          o.submodels = submodels;

          You can adopt this to your own situation.