You could replace the table and the php loop with this and it will give you a drop down with a go button;
<script type="text/javascript">
function submitForm() {
var list = document.navList.subMenu;
var page = list.options[ list.selectedIndex ].value;
if (page != "home")
window.location = page;
return false;
}
</script>
<form name="navList" onsubmit="return submitForm();">
<select name="subMenu">
<option value="home">Current Month</option>
<?php
while ($startyear <= $today[year]):
{
$month_name = date( 'F', mktime(0, 0, 0, $startmonth) );
echo '<option value="'.url('/TopPilot/get_old_stats?month='.$startmonth.'&year='.$startyear.'').'">'.$month_name.' - '.$startyear.'</option>';
//advance dates
if ($startmonth == $today[mon] && $startyear == $today[year])
{
break;
}
if ($startmonth == 12)
{
$startyear++;
$startmonth = 01;
}
else
{
$startmonth++;
}
}
endwhile;
?>
</select>
<input type="submit" value="Go" />
</form>
An example is at the bottom of the page here -> http://www.virtualaca.net/index.php/TopPilot