HyperOsmar
Member
Dear Colleagues, I need your help...
I need to compare three fields:
'{cad_eventos___local}'; (the space available for the class)
'{cad_eventos___turno}'; (the shift in which the class will take place)
'{cad_eventos___data_inicio}'; (the class start date)
I created a form to schedule class spaces, so locations, shifts and dates cannot coincide.
Within the element '{cad_eventos___data_inicio}' I enabled validation in PHP to compare the fields.
Please where is the error:
$loc = '{cad_eventos___local}';
$tur = '{cad_eventos___turno}';
$ini = '{cad_eventos___data_inicio}';
$registrosVerificados = array();
$key = $loc . '_' . $tur . '_' . $ini;
if (in_array($key, $registrosVerificados)) {
return 'Date unavailable for the selected location and shift.';
} else {
$registrosVerificados[] = $key;
return 'Condition successfully verified!';
}
I need to compare three fields:
'{cad_eventos___local}'; (the space available for the class)
'{cad_eventos___turno}'; (the shift in which the class will take place)
'{cad_eventos___data_inicio}'; (the class start date)
I created a form to schedule class spaces, so locations, shifts and dates cannot coincide.
Within the element '{cad_eventos___data_inicio}' I enabled validation in PHP to compare the fields.
Please where is the error:
$loc = '{cad_eventos___local}';
$tur = '{cad_eventos___turno}';
$ini = '{cad_eventos___data_inicio}';
$registrosVerificados = array();
$key = $loc . '_' . $tur . '_' . $ini;
if (in_array($key, $registrosVerificados)) {
return 'Date unavailable for the selected location and shift.';
} else {
$registrosVerificados[] = $key;
return 'Condition successfully verified!';
}