im not positive on this... but try to use
while ($row = mysql_fetch_array($result))
{
$month = $row[month];
$day = $row[day];
$year = $row[year];
}
instead of
while ($row = mysql_fetch_array($result))
{
$month = $row["month"];
$day = $row["day"];
$year = $row["year"];
}
as far as i remember you reference the variables without quots.
and just a little other hint: i'd use switch statements instead of the huge if/elseif/else constrctions 😉