this little piece of code does not have the effect i intended it to have, in fact it does nothing, nothing is added to $errors even if there are errors in the date submitted... month and date comes from select elements and year is entered manually....
PHP:
if (!empty($formvars["month[0]"]))
{
if (!empty($formvars["day[0]"]))
{
if (!checkdate($month[0], $day[0], $year))
$errors .= "Your birth date is not valid";
elseif (intval($formvars["year"]) < 1890)
$errors .= "Unfortunately, dead people can´t sign up for this service.";
} }