how to fill combobox from database in php
  • i want to fill data from database in php how can i do it.
  • 1 Comment sorted by
  • Vote Up0Vote Down NafeesNafees
    13.50 Karma Accepted Answer
    <select name="test">
    <?php
    $sql="select column_name from table";
    $q=mysql_query($sql);

    while($row=mysql_fetch_array($q))
    {

    echo "<option value=".$row[column_name]."</option>";
    }
    ?>
    </select>


    Regards:
    Nafees PHP Developer

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Tagged

Popular Posts of the Week

Top Posters Weekly

Optimum Creative