Hi Got some code here to dynamically generate drop down boxes in forms, however my query runs and the box appears with the correct amount of lines but they're all blank. I'm aware of where the error is, it's with my $drop_down_asoc arrays, but not sure how to format them properly, any ideas?
Code:
function make_dropdown($tablename, $columnid, $columnname)
{
$drop_down = select_all($tablename, $columnname.' Asc');
$drop_down_numrows = querynumrows($drop_down);
print '<select name="'.$columnid.'">';
for ($dd=0; $dd <$drop_down_numrows; $dd++)
{
$drop_down_asoc = query_asoc($drop_down);
print '<option value="'.$drop_down_asoc['$columnid'].'>'.$drop_down_asoc['$columnname'].'</option>';
}
print '</select>';
}