Bradley99 Posted June 27, 2012 Share Posted June 27, 2012 I have/need a select field in my form when it lists two separate columns inside a single option. Here is the code I use for a single column: <td class="profilerow" colspan="40%"><select name="fotn_id"> <?php $select_fotn = mysql_query("SELECT id, fighter1 FROM fights WHERE event='$viewevent' ORDER by id ASC"); while($the=mysql_fetch_object($select_fotn)){ echo "<option value=\"" .$the->id . "\">" .$the->fighter1 . "</option>\r"; } ?> How can I change the query so that it lists not only $the->fighter1 BUT also lists $the->fighter2 after fighter1? So like so. . dropdown fighter1 fighter2 Thanks Link to comment https://forums.phpfreaks.com/topic/264904-select-drop-down-from-2-colums/ Share on other sites More sharing options...
Bradley99 Posted June 27, 2012 Author Share Posted June 27, 2012 Had a thick moment. Sorted. If anyone has same problem, Just use 2 options. DUH! Link to comment https://forums.phpfreaks.com/topic/264904-select-drop-down-from-2-colums/#findComment-1357563 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.