This the code, I keep getting the error function not define but Im attempting to retrieve the data from mysql. This code was working with an older version on PHP.
$date1 = $_GET['date1'];
$date2 = $_GET['date2'];
if (validateDate($date1){
$date1status = true;
} else {
$date1status = false;
}
if (validateDate($date2){
$date2status = true;
} else {
$date2status = false;
}
$bywho = $_GET['bywho'];
if (!empty($bywho) {
$whostatus = true;
} else {
$whostatus = false;
}
$programfilter = $_GET['programfilter'];
if ($programfilter == '') {
$programfilterstatus = false;
} else {
$programfilterstatus = true;
}
2
Answers
Less code
I’m going to go out on a limb here and assume your validateDate() method is not defined, and since its not part of the PHP library, you’re getting the error.
checkdate() is part of the php library however. If you’re just trying to validate a date in gregorian format then checkdate() is what you should use
https://www.php.net/manual/en/function.checkdate.php