Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

HTTPService question

Avatar

Level 2

Hello,

     I want to send company information over httpservice to a webserver running php. The company information includes company address, and list of usernames. My form has this info

Company Name

Addr1

Addr2

State

Country

array of users in array collection.

How do I send this in one http request.

Thanks,

Bharani

2 Replies

Avatar

Level 3

Hi,

         Create an object in Flex Side (var temp:Object=new Object()) and assign the values whatever are required for you to this Object

         for example:

                            temp.Company Name="XXXX";

                            temp.Addr1="XXXX"; and so on...............

        In the same way collect all th list of Users to one Array  and assing the same array to the Object

                           temp.users=arr;

       And send this object(temp) to the Php via HttpService.

       I dont know how to get in php but in java you can use request.getParmaterValues("users") in order to get users that you are sending

Avatar

Former Community Member

These links use JSON to handle the data, but the PHP code, as well as the Flex code, should answer your questions.

If this post answers your question or helps, please mark it as such.

http://www.switchonthecode.com/tutorials/flex-php-tutorial-transmitting-data-usi ng-json

http://www.switchonthecode.com/tutorials/using-flex-php-and-json-to-modify-a-mys ql-database

http://www.switchonthecode.com/tutorials/flex-php-json-mysql-advanced-updating