';
#echo 'Method: ' . $_SERVER['REQUEST_METHOD'];
#print_r($_POST);
#echo '';
foreach ($required as $field => $label) {
if (empty($_POST[$field]) && $_POST[$field] !== "0")
$missing[] = $label;
}
if (!empty($missing)) {
show_error("Some required fields are missing:", $missing);
show_form();
exit;
}
$badyear = '';
if ($_POST['useyear'] > 2002 || $_POST['useyear'] < 1990)
$badyear = 'User since';
else if ($_POST['devyear'] > 2002 || $_POST['devyear'] < 1990)
$badyear = 'Developer since';
if ($badyear) {
show_error("Invalid year for $badyear
");
show_form();
exit;
}
if (!check_date('use')) {
show_error("Invalid date for User since
");
show_form();
exit;
}
if (!check_date('dev')) {
show_error("Invalid date for Developer since
");
show_form();
exit;
}
save_data();
?>
Thanks.
For anyone who's interested in seeing the results, I'll be posting
them here in a week or so.