I need to make some modification in joomla module. I need a select box which select value from database when user select value from that database it redirect user to another page. which show result of that page. I am able to generate select box with value from database now how i can redirect it to another page of joomla. Here is code that i used:
<?php
$db = JFactory :: getDBO();
$query = "select * from #__galleries where parent=0 order by date";
$db->setQuery($query);
$result = $db->loadObjectList();
$options = array();
$options[] = JHTML::_('select.option', '0', '-Select Gallery-');
foreach($result as $row)
{
$options[] = JHTML::_('select.option', $row->id, $row->name);
}
$dropdown = JHTML::_('select.genericlist', $options, 'class="inputbox"', 'name="select"', 'value', 'text');
echo $dropdown;
?>