PDA

View Full Version : drop down box in admincp file.


harmor19
07-07-2006, 07:40 PM
How do I create a dynamically populated drop down box in an admin cp file?

Edit:
I got it. Here's the code to create a drop down box


$category = array();
$category[] = "Select a Category";
$getcats = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "custom_links_cat ");
while($cat = $db->fetch_array($getcats))
{
$category[] .= $cat['title'];
}

print_select_row('Category', 'catid', $category, $cat['catid']);