0 Replies Latest reply on Oct 1, 2008 7:31 AM by JmfD

    Data Binding error with PHP form

      I'm trying to create a email form that will pull down the send to email address from a database to a tile repeater list of checkboxes, were you could choose who you want to send an email to. I keep getting a databinding warning for the emailTo code. However when I change my php code to send to a static address it works. Any ideas?

      MXML code:
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
      layout="absolute" xmlns:events="flash.events.*">

      import mx.controls.Alert;

      private function sendInfo():void{
      if(user.text=="" || email.text=="" || message.text==""){
      mx.controls.Alert.show("Sorry, information appears to be missing!")
      } else {

      private function thanks(event:Event):void{
      mx.controls.Alert.show("Thanks! Your message has been sent.")

      import mx.collections.ArrayCollection;
      import mx.rpc.events.ResultEvent;

      private var datalist:ArrayCollection;

      private function resultHandler(event:ResultEvent):void{
      datalist = event.result.data.row;
      public function doSend():void {
      xmlFromDatabase.url = " http://localhost/xml.php";
      <mx:HTTPService id="srv" url=" http://localhost/mail.php" method="POST" contentType="application/x-www-form-urlencoded" resultFormat="text" result="thanks(event)">
      <mx:HTTPService url=" http://localhost/xml.php"
      method="GET" />
      <mx:Form x="430" y="10">
      <mx:FormItem label="Sent To">
      <mx:Tile x="10" y="425" width="250">
      <mx:Repeater id="dataRepeater" dataProvider="{datalist}">
      <mx:CheckBox x="10" y="434" id="emailTo" label="{dataRepeater.currentItem.username}" />
      <mx:FormItem label="Name">
      <mx:TextInput id="user"/>
      <mx:FormItem label="Email">
      <mx:TextInput id="email"/>
      <mx:FormItem label="Message">
      <mx:TextArea width="211" height="117" id="message" />
      <mx:Button label="Submit" click="srv.send()"/>