Thank you for replying.
The PHP code for creating the drop down menus is as follows:
<td <?php
$monthName = array(1=> "January", "February", "March","April", "May", "June", "July","August", "September", "October","November", "December");
$today = time();
$f1_today = date("Y-M-D",$today);
echo "<div style = 'text-align: center'>\n";
/ build selection list for the month /
$todayMO = date("n",$today); //get the month from $today
echo "<select name='dateMO1'>\n";
for ($n=1;$n<=12;$n++)
{
echo "<option value=$n\n";
if ($todayMO == $n)
{
echo " selected";
}
echo "> $monthName[$n]\n";
}
echo "</select>";
/ build selection list for the day /
$todayDay= date("d",$today); //get the day from $today
echo "<select name='dateDay1'>\n";
for ($n=1;$n<=31;$n++)
{
echo " <option value=$n";
if ($todayDay == $n )
{
echo " selected";
}
echo "> $n\n";
}
echo "</select>\n";
/ build selection list for the year /
$startYr = date("Y", $today); //get the year from $today
echo "<select name='dateYr1'>\n";
for ($n=$startYr-66;$n<=$startYr;$n++)
{
echo " <option value=$n";
if ($startYr == $n )
{
echo " selected";
}
echo "> $n\n";
}
echo "</select>\n";
?></td></tr>
And the code for inserting it into mysql is:
$query = "INSERT INTO personalinfo (birthdate)
VALUES ('$_POST[f1_today]');