Bumping this in hopes of getting an answer..
Quote:
Originally Posted by helwoe
Sorry for the double post.
Thank you very much Bananalive for the multi-select code!
I found if I use more than one custom question with this code, the extra questions show up as double drop downs side by side instead of just one drop down each.
PHP Code:
$answer .= '<select name="'.$formbit[id].'[]" multiple="multiple" size="4">';
$answer .= '<option></option>';
$thisanswer = explode(',',$qo[$formbit[id]]);
$members = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "user
WHERE membergroupids LIKE \"%17%\"
ORDER BY username ASC");
while($row = $db->fetch_array($members)) {
$answer .= '<option value="'.$row[username].'"';
if (in_array($row[username], $thisanswer)) {
$answer .= 'selected="selected"';
}
$answer .= '>'.$row[username].'</option>';
}
$answer .= '</select>';
|