Name: Anonymous 2011-05-23 6:02
God i hate preg_match and ereg etc.
if (!preg_match("|[0-9]{4}-[0-9]{2}-[0-9]{2}|",$dob)) {
$error = "The Date of Birth must be correctly formatted (YYYY-MM-DD).";
header("Location: add.php?error=$error");
}
Anyone see anything wrong? Or a better way to do it.
if (!preg_match("|[0-9]{4}-[0-9]{2}-[0-9]{2}|",$dob)) {
$error = "The Date of Birth must be correctly formatted (YYYY-MM-DD).";
header("Location: add.php?error=$error");
}
Anyone see anything wrong? Or a better way to do it.