I have three select option list for month,day and year
<?php echo form_dropdown('dob[month]',$dates['months'],set_value('dob[month]','0'));?>
<?php echo form_dropdown('dob[day]',$dates['days'],set_value('dob[day]','0'));?>
<?php echo form_dropdown('dob[year]',$dates['years'],set_value('dob[year]','0'));?>
To validate if the entered date by the user is valid or not i am using the following rules:
$this->form_validation->set_rules('dob','date of birth','valid_dob');
Where valid_dob is a function defined in a My_form_validation class as follow :
public function valid_dob($dob)
{
if(checkdate($dob['month'],$day['day'],$day['year']))
{
return true;
}
return false;
}
But the function defined above is not executing by codeigniter,Please
let me know how can i validate a date using three drop down list.
Thanks.