please i have an error message as viz(Notice: Undefined variable: select in C:\xampp\htdocs\interest.php) running this code
<?php
//lets select options from a dropdown list using php functions
$month = array("jan" => "Jan", "feb" => "Feb", "mar" => "Mar", "apr" => "Apr", "may" => "May", "jun" => "Jun", "jul" => "Jul", "aug" => "Aug", "sep" => "Sep", "oct" => "Oct", "nov" => "Nov", "dec" => "Dec");
$default = "jan";
$select = generate_menu("month", $month, $default);
function generate_menu($name, $month, $default="") {
$select .= "<SELECT NAME=\"$name\">"; <<<<------- this is where the error is located
foreach($month as $value => $label) {
$select .= "<OPTION ";
if ($value == $default)
$select .= "SELECTED ";
$select .= "VALUE=\"$value\">$label</OPTION>";
}
$select .= "</SELECT>";
return($select);
}
?>
<FORM ACTION="month.php" METHOD=POST>
<?php print $select;?>
<INPUT TYPE=SUBMIT VALUE="Continue">
</FORM>