1 Reply Latest reply on Feb 2, 2007 5:45 PM by chris.huston.t10

    Return from a PHP Script


      I'm trying to get PHP and Flex to work with one another. I know that my program is getting the result, because if I change the XML to be invalid, my program will throw an error that says just that. However... I can't use the data that I am getting back from the PHP script. I have a the [httpService].lastResult.[blah].[blah] bound to a datagrid, but no matter what I try it isn't showing up. I've tried calling the httpService send() on both creationComplete and a button click.

      Any ideas what my problem could be? The documentation isn't helping me any :(
        • 1. Re: Return from a PHP Script
          chris.huston.t10 Level 3
          Please post your code for your dataGrid and your PHP or a sample of the returned XML. Without code, it is hard to say where the problem is, but it seems like the issue is in your [httpService].lastResult.[blah].[blah] syntax. It helps to set a result event for PHP calls that you then bind to your dataGrid rather than using the lastResult method which is hard to debug:

          private function phpResult(evt:ResultEvent):void {
          myDataGrid.dataProvider = evt.result;

          But post your code and I'm sure we can figure out the problem.