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? Quote 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. Quote 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>"; Quote Link to comment https://forums.phpfreaks.com/topic/84474-listbox-with-invisible-column/#findComment-430594 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.