A3aan Posted November 5, 2006 Share Posted November 5, 2006 Hi all,i'm trying to fill a drop down list from a function, but the list stays empty.Hope that you can help me out with this.Here's my code:[code]<?phprequire_once ('Connections/magicdb.php'); // db connectfunction showEdition() { $query = "SELECT edition_id, edition_name FROM editions ORDER BY edition_name" ; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_assoc($result)){ echo "<option value='$row[edition_id]'>$row[edition_name]</option>\n"; }}?><form><select><?php echo showEdition(); ?></select></form>[/code]Thnx in advance Link to comment https://forums.phpfreaks.com/topic/26247-empty-drop-down-list-lil-help-please-solved/ Share on other sites More sharing options...
A3aan Posted November 5, 2006 Author Share Posted November 5, 2006 Pfff... made a newbie mistake ;Dforgot to select the db :o :-X Link to comment https://forums.phpfreaks.com/topic/26247-empty-drop-down-list-lil-help-please-solved/#findComment-120088 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.