1 Reply Latest reply on Dec 12, 2008 7:23 AM by Alberto_Mz

    Array from Flex to a PHP HTTPService

      I need to send a array from Flex to PHP. I can´t use a remote object, because the PHP needs to be opened in a new browser window.

      How can I access the array sended by the Flex application to the PHP script ?

      The code to activate the PHP is:

      [Bindable] public var arrDadosPagSeguro:Array = new Array();

      public function AcessaPagSeguro():void
      var campos:URLVariables = new URLVariables();
      campos.tabela = "ocorrencia";
      campos.idea1 = "3";
      campos.arrayCarrinho = arrDadosPagSeguro;
      var request:URLRequest = new URLRequest("pagseguro/acessaPagSeguro.php");
      request.data = campos;
      request.method = URLRequestMethod.POST;
      navigateToURL(request, "_blank");

      I know how to get the string variables from Flex to PHP:

      $tabela = $_REQUEST['tabela'];
      $idea1 = $_REQUEST['idea1'];

      this is not a problem.

      I don´t know how to get the arrayCarrinho variable from Flex. I try this:

      $arrayCarrinho = get_object_vars($_REQUEST['arrayCarrinho']);

      but this didn´t works.

      Does anybody has idea how to do this ?

      (please sorry for my bad english...)