Hi All,
This seems simple, but I am not having much luck.

I want to have a form that displays date fields (in a form where the label is "Date of Birth:") that shows "Day, Month, Year" in the dropdowns but also the possible values.

Here is the code.


// Months Array

$months = array (1 => 'Month', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');

// Day and Year Arrays
$day = array(1Day', range(1-31));
$year = array('Year' range(1900-2012))

// Label for date of death
echo "<p><label>Date of Death/label></p>";

// Make the months pull-down menu:

echo '<select name="month">';
foreach ($months as $key => $value) {
echo "<option value=\"$key\">$value</option>\n";
echo '</select>';

// Make the days pull-down menu:

echo '<select name="day">';
foreach ($days as $value) {
echo "<option value=\"$value\">$value</option>\n";
echo '</select>';

// Make the years pull-down menu:
echo '<select name="year">';
foreach ($years as $value) {
echo "<option value=\"$value\">$value</option>\n";
echo '</select>';

Of course, Month displays as needed, but the others do not work and I have tried treating this as a multi-dimensional array to no avail. Any thoughts, because I am stuck on something simple (again )