2 Replies Latest reply on Sep 15, 2009 12:29 AM by Varun Bajaj (PHP)

    Email flex list contents using php

    Marlene

      I have dragged 5 items from a datagrid to a drop-enabled list component. Now I want the user to be able to email himself the list. I am using PHP and have an HTTP service request and PHP mailer code but I do not know how to get the data that is in the list into variables that I can use with my php code.

       

      <mx:HBox>

      <mx:VBox>

           <mx:DataGrid dataProvider="{restaurantsAC}" dragEnabled="true" height="300" width="600" id="restaurantsDG">

                <mx:columns>

                <mx:DataGridColumn dataField="restaurantName" />

                <mx:DataGridColumn dataField="restaurantAddress" />

                <mx:DataGridColumn dataField="restaurantCuisine" />

                <mx:DataGridColumn dataField="restaurantPrice" />

                </mx:columns>

              mx:DataGrid>

           <mx:LinkButton label="Show my Favorites List" click="showFavoritesList()"/>

       

      </mx:VBox>

       

      <mx:Canvas id="favoritesListContainer" height="100%" includeInLayout="false" visible="false">

      <mx:SWFLoader source="assets/myFavorites.swf" x="10" y="10"/>

      <mx:List id="favoritesList" x="10" y="40" dropEnabled="true"  labelField="restaurantName" />

      </mx:Canvas>

       

      </mx:HBox>

      <mx:Button click="sendFavorites()" />    

       

       

      public function sendFavorites():void {

                      var h:HTTPService=new HTTPService();

                      h.url="http://wmywebsite.com/mail.php";

                      h.request=??????????????;

                      h.method="POST";

                      h.send();

                    

      }

       

      Thanks for any assistance!