[eluser]terrycyleung[/eluser]
Hi Master,
I guest the error is in this new custom function, when I enable this check the "blank page" will show and this appointment must cannot insert to database either is it have duplicate record, could you please help me to check, thank you so much.
I also modify this function, is it the error exist in foreach? I don't know is it retrieved the record and store in array.
function booking_check($appointment_date, $start_time, $end_time)
{
$result = True;
$appointment_date = $this->input->post('appointment_date');
$start_time = $this->input->post('start_time');
$end_time = $this->input->post('end_time');
$query = get_appointments($appointment_date);
//$query = $this->appointment_model->get_appointments($appointment_date);
foreach ($query as $appointment){
if (strtotime($start_time) == strtotime($appointment['start_time']))
{
$this->form_validation->set_message('booking_check', '%s Time Deuplicate');
return FALSE;
$result = FALSE;
} //End if
} //End foreach
} //End of booking Check