5 Replies Latest reply on Aug 20, 2009 3:52 PM by Gregory Lafrance

    How to send data from database to textimput

    sboja85

      How to do this correct?

      [php]
      if ($_POST['request'] == "pokazOnas") {

           $sql = mysql_query("SELECT text FROM podstrony WHETE podstrona=Onas");
           $result = "";
          
           $result .= '<tab>';
           while($row = mysql_fetch_array($sql))
           {
               $result .= "<element text='".$row['text']."' />";
           }
           $result .= '</tab>';
           echo $result;
      }


      [/php]
      [html]<mx:List width="701" dataProvider="{pokazOnas.lastResult.tab.element}">
                      <mx:TextInput id="tekst_Onas" width="700" height="440" text="tab.selectedItem.text"/>
      </mx:List>

               <mx:HTTPService id="pokazOnas" url="http://localhost/server-debug/form.php"
                           method="POST">
                               <mx:request>
                                   <request>pokazOnas</request>
                               </mx:request>
               </mx:HTTPService>[/html]

       

      Error:


      Severity and Description    Path    Resource    Location    Creation Time    Id
      Multiple initializers for property 'dataProvider'. (note: 'dataProvider' is the default property of 'mx.controls.List').