3 Replies Latest reply on Sep 2, 2009 2:54 AM by sri harsha namala

    database to combobox


      Hi! Is there a way that the data from my database will be put on the combobox?

      Everytime I will add a data from my database, it will be automatically be put on my combobox.

      I already done it but it always fail


      here's my code on flex


      <mx:ComboBox x="374" y="29" dataProvider="{elect.lastResult.election.list}" color="#040404" width="159"></mx:ComboBox>


      <mx:HTTPService id="elect" url="electionlist.php" useProxy="false" showBusyCursor="true">
          <mx:request xmlns="">


      Here's my code on PHP (electionlist.php)


      include "connection.php";


      $election = mysql_query("select year from election");


      print "<election>";
      while ($row = mysql_fetch_row($election)) {
          print "<list>$row[0]</list>";
      print "</election>";


      I don't know if I'm doint it right,

      Please help me to fix this

      thank you!