johntigner Posted January 4, 2008 Share Posted January 4, 2008 is it possible to have a dropdown with two fields from a table ... but only show one field? Link to comment https://forums.phpfreaks.com/topic/84474-listbox-with-invisible-column/ Share on other sites More sharing options...
drummer101 Posted January 4, 2008 Share Posted January 4, 2008 Just use <input type="hidden"> for whatever you need to do. Link to comment https://forums.phpfreaks.com/topic/84474-listbox-with-invisible-column/#findComment-430487 Share on other sites More sharing options...
Barand Posted January 4, 2008 Share Posted January 4, 2008 Do you mean this where only the description is visible. The values attached to each description are the ids <?php $res = mysql_query ("SELECT id, description FROM atable"); echo "<select name='mydropdown'>"; while (list($id, $description) = mysql_fetch_row($res)) { echo "<option value='$id'>$description</option>"; } echo "</select>"; Link to comment https://forums.phpfreaks.com/topic/84474-listbox-with-invisible-column/#findComment-430594 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.