I am trying to fetch a data from my database and display it in my dropdownlist but i cant get the result I try the other post here but cant understand
anyone can help me with this this is for my project
<?php
    $connection =mysql_connect('localhost', 'root', '','mjj_app');
    $sql="SELECT food FROM menu";
    $lists=mysql_query($sql);
    echo"<select name='fname' id='mySelect' value='Foodname'>"
    while($food = mysql_fetch_array($lists)) {
       echo '<option value='.$food['food'].'>'.$food['food'].'</option>'; 
    }
    echo '</select>';
?>
 
     
     
    