Welcome Guest, Not a member yet? Register   Sign In
Checking Date
#1

[eluser]Ken Verhaegen[/eluser]
I'm making a form, and need to check a date.
I have 3 dropdowns, containing days, months and years.

I know I can check those values by putting them together inside the PHP checkdate() function,
but how do I manage it so that the Form Validation library reacts to it?


Re-cap:
-------
So, I have 3 dropdowns
Code:
bd_day [values: 01-31]
bd_month [values: 01-12]
bd_year [values: 1900-date('Y')]

Now I want to check if the combined values make a valid date:
Code:
checkdate ( $bd_month, $bd_day, $bd_year ); [returns BOOL]

And I want it so, that if it isn't a valid date, that the form validation class doesn't pass and returns a form_error();

Thanks in advance!




Theme © iAndrew 2016 - Forum software by © MyBB