Quote:
Originally Posted by bananalive
- Create custom question
- php code:
PHP Code:
$answer = '<select name="'.$formbit[id].'">';
$answer .= '<option></option>';
$thisanswer = $q[$formbit[id]];
$threads = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "thread
WHERE forumid = '10'
ORDER BY title ASC");
while($row = $db->fetch_array($threads)) {
$answer .= '<option value="'.$row[threadid].'"';
if ($row[threadid] == $thisanswer) {
$answer .= 'selected="selected"';
}
$answer .= '>'.htmlspecialchars($row[title]).'</option>';
}
$answer .= '</select>';
- Replace 10 with appropriate forumid
- Edit Form Hook: Before Submit
PHP Code:
$form['threadid'] = $q[1];
- Replace 1 with appropriate question hash
|
Thanks MUCH. Will try this tonight.