Let's say you're building a site for a real estate agency. To make it easy for visitors to find the type of property they're looking for, your search form needs to offer a range of options, but not all visitors will want to select every option. To search the database successfully, you need to build a SQL query that includes only those options that have been selected.
Solution
Use a PHP loop to build the SQL query based on the fields that contain user input.
I want to display a website in my AIR application, but this website requires a login/password authentification. I don't want my users to see this form.
Solution
I'll use the HTML component to display the website. When the page is fully loaded, I use javascript to force values in the authentification fields (login and password), then trigger the click on the submit button.
I have a AIR application using the HTML component to display a simple HTML page. In this page, I only have a link to a PHP script forcing the download of a PDF file. The problem is AIR doesn't know what to do with pages forcing files download, if you click on it in your AIR application, nothing will happen.
Solution
Each time the HTML component renders HTML, I will fetch every links included in the page and bind the "click" event to an Actionscript Method. In this method, I'll open a save window using the File class and download the file targeted by the link.
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.
You want to create a dynamic image gallery using Flex and MYSQL. You have the following flow requirements:
1. You want to be able to upload a preview image to display in the datagrid
2. You want to include a description in the datagrid
3. You want to include a download button to download native files
4. You want the ability to delete the item from the datagrid.
Solution
For this example we are going to combine the power of Flex with PHP to communicate with the MYSQL database. Flex will provide the itemRenderer function we need to display images and buttons in the datagrid. We will also take advantage of data binding components to upload multiple files at once.
I would like to start using AMFPHP, to connect my Flex applications with PHP and MySQL database. I cannot find one simple example with getting and sending the data to the server. It would be nice to have it all in one place so that I can use this example to create more advanced examples.
Solution
In this example I showed how to call a simple AMFPHP service method and how to handle this data in a Flex application. There is an example how to handle PHP data class instances in Flex by mapping PHP class with Actionscript class.
This site is produced in partnership with
O'Reilly.