refiking Posted April 7, 2008 Share Posted April 7, 2008 I am trying to call the records from the db into a drop down box, but it only has one record int he dropdown box. All the other records are present, but they appear after the form. How can I fix this? here is the code: <form action="commish.php" method="post"> <select name="owner"><option><font color="silver">Select Owner</option> <option><font color="silver"> <? $sql9 = mysql_query("SELECT * FROM retab WHERE lid = '$lid' AND sid = '$sid' ORDER BY did DESC")or die(mysql_error()); while($row9 = mysql_fetch_array($sql9)){ $owner = $row9['name']; echo $owner."<br>";?></option></select> <? } ?> Link to comment https://forums.phpfreaks.com/topic/99992-need-help-with-db-related-form/ Share on other sites More sharing options...
rhodesa Posted April 7, 2008 Share Posted April 7, 2008 <form action="commish.php" method="post"> <select name="owner"> <option><font color="silver">Select Owner</font></option> <?php $sql9 = mysql_query("SELECT * FROM retab WHERE lid = '$lid' AND sid = '$sid' ORDER BY did DESC")or die(mysql_error()); while($row9 = mysql_fetch_array($sql9)){ echo '<option><font color="silver">'.$row9['name'].'</font></option>'; } ?> </select> </form> Link to comment https://forums.phpfreaks.com/topic/99992-need-help-with-db-related-form/#findComment-511333 Share on other sites More sharing options...
refiking Posted April 7, 2008 Author Share Posted April 7, 2008 Thanks! Link to comment https://forums.phpfreaks.com/topic/99992-need-help-with-db-related-form/#findComment-511337 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.