I am trying to add a Date of Birth field into a page with the following script. However. If I put the date Jan 01 1970 then 1970 appears. If I use Jan 01 1960 (or anything beleow 1969) the year 1969 apears.
$today = time();
$f_today = date ("M-d-Y",$today);
$importantDate = strtotime("January 01 1960");
$startYr = date("Y", $importantDate); //get the year from $today
echo "<select name='dateYr'>\n";
for ($n=$startYr;$n<=$startYr+5;$n++)
{
echo " <option value=$n";
if ($startYr == $n )
{
echo " selected";
}
echo "> $n\n";
}
echo "</select>\n";
Am I being a major league novice?