Hey,
I'm not an experienced programmer and am trying to us the checkdate function.
it results in an error.
Wrong parameter count for checkdate()
Can anyone point out how to use this exactly ? the datefield input should be YYYY-MM-DD , as this is the format used in MySQL.
I just want to make sure the date exists and is in the correct format. Coding below.
Thanks in advance
Steve
if ($submit) {
// process form First validate
if ( !$pldate || !$employeeID ) {
echo "Date, Employee are required fields. Please try again.";
} else {
if (checkdate($pldate) == 1) {
echo "Date is not a valid date";
} else {
$sql = "INSERT INTO tblPlanner (date, employeeID) VALUES ('$pldate', '$employeeID')";
$result = mysql_query($sql);
}
}