Im looking for a tutorial on how to populate a form listbox with values from a mysql column|?
any ideas on how its done or where to look for tutorial?
thanks
biscutty
<? $query = "select fieldname from tablename;"; $result = mysql_query($query) or die(mysql_error()); ?> <select name="listbox"> <option value="0">Select One</option> <? while ($row = mysql_fetch_array($result)) { ?> <option value="<? echo $row[fieldname]; ?>"> <? echo $row['fieldname']; ?> </option> <? } ?> </select>