Avg. Rating 4.5

Problem

I would like to see one simple example how can I get the data from PHP and MySQL server and handle them in my Flex Application.

Solution

In this example you will see a simple example how to fill your combobox, datagrid, labels with the data received from AMFPHP service and how can you handle data updates.

Detailed explanation

This post continues on my previous post - Starting with AMFPHP, so if you haven't used AMFPHP before, please read it.

So, in this post you can download an example that shows you how to format your SQL query to create PHP array and how to send this array to your ComboBox component, in order to  get data displayed. Also, you can see how to handle ComboBox events and how this event can call another AMFPHP  service method to get data for DataGrid component.

Like in my previous  post, you will see information  about soccer teams and soccer players, but now you will have a oportunity to change player's  team. Updating player team you will call Actionscript handler that will update your DataGrid, displaying all the players from a new team, in which your player was transfered.

 

 

PopulateComponentsWithAMFPHP.zip
[Extract this archive. Use SQL script to generate objects in AMFPHP MySQL database. Extract all from PHP directory into AMFPHP service directory. In FLEX directory you can find a finished Flex project that you can import into your Flex workspace.]
Report abuse

Related recipes