2008-03-27, 10:19 PM
Ok I have put a search box in my header file and want to make it so it is not just a search ALL option, but instead they can choose which forum to search from a drop down menu.
I tried modifying the header in the template file like this:
and learnt that myBB deffinitely does not like that php code in the header file.
So my question is how do I go about it?
I tried modifying the header in the template file like this:
<SELECT name="forums" size="5">
<?php
$frmquery = "SELECT fid, name FROM mybb_forums WHERE type = f ORDER BY fid";
$frmresult = mysql_query($frmquery);
while($row = mysql_fetch_array($frmresult, MYSQL_ASSOC)) {
$fid = $row['fid'];
$name = $row['name'];
echo "<br /><option value=\"$fid\">$name</option>";
}
?>
</SELECT>
and learnt that myBB deffinitely does not like that php code in the header file.
So my question is how do I go about it?