[eluser]TheFuzzy0ne[/eluser]
How about this:
Code:
function date_check ()
{
$day = $this->input->post('day');
$month = $this->input->post('month');
$year = $this->input->post('year');
if (checkdate($month, $day, $year))
{
return TRUE;
}
$this->form_validation->set_message('date_check', 'The date field is invalid');
return FALSE;
}
It should work in the same way.
NB: Just an observation - I noticed that the month is passed to checkdate() as the first parameter, and I expected it to pass the day in as the first parameter, is that right?