Hello, I have a lookup table that I have a problem with someplace and I cannot figure out exactly where it is.
Here is the code
<?php
DATABASE CONNECTION HERE
$lookup = array("January" => '01', "February" => '02', "March" => '03', "April" => '04', "May" => '05', "June" => '06', "July" => '07', "August" => '08', "September" => '09', "October" => '10', "November" => '11', "December" => '12');
// use month names on your form
$month = $_POST["age_mth"]; // the name
$monthnum = $lookup[$month]; // the number
$query = "INSERT INTO `subdomain_submission` (age_month) VALUES ('{$monthnum}');";
print "month = $month";
print "monthnum = $monthnum";
?>
the print function reads this
month = monthnum =
so, the correct reading should be
month = October monthnum = 10
any ideas. Thanks for the consideration.