I would like to thank
Valter for his contribution to solving my problem, even though he does not realize he helped! (I will PM him a thank you, as i found my working solution while browsing through a plugin written by him), and to you BirdOfPrey for your help as well.
My Solution:
First, i added another table with the data for the <select>. This will actually serve 2 purposes, 1st being solving my issue, and the 2nd allows me to create another admin page that will allow me to update the data in that table.
Inside the plugin code i added
Code:
...
$vbulletin->db->hide_errors();
$getlist= $vbulletin->db->query_read("
SELECT class_id, class_desc
FROM " . TABLE_PREFIX . "class AS class
ORDER BY class_desc ASC
");
$vbulletin->db->show_errors();
while ($class = $vbulletin->db->fetch_array($getlist))
{
$class_id = $class['class_id'];
$class_name = $class['class_desc'];
eval('$class_selector .= " <option value=\"'.$class['class_id'].'\" " . iif($rkc_variable1[class_1]==$class[class_id]," selected=\"selected\"","").">'.htmlspecialchars($class['class_desc']).'</option> ";');
}
...
$templater->register('class_selector', $class_selector);
$templater->register('class_name', $class_name);
$templater->register('class_id', $class_id);
Then in my template, i added the following code:
Code:
<td>
{vb:rawphrase class1_phrase}: <select id="set_class1" name="set_class1">{vb:raw class_selector}</select>
</td>