How to validate this date of birth from a form ?
Posted: Wed Oct 22, 2008 4:00 pm
Hello chiefs,
On a form, i have an input box :
This input box is there for users to set their date of birth .
I want the users to give into that input box their date of birth in such a way : DAY/MONTH/YEAR dd/mm/yy
and so am expecting from every user to write something like this : 20/12/1960 .
Ok till here
Now i want to validate the day of birth in this form of dd/mm/yy !
But how to ?
I store the input into one variable $thedate.. par example,
Now how we can validate the index of this variable correctly ?
Thanks
On a form, i have an input box :
Code: Select all
<form>
<input name="birthdate" value="">
</form>
I want the users to give into that input box their date of birth in such a way : DAY/MONTH/YEAR dd/mm/yy
and so am expecting from every user to write something like this : 20/12/1960 .
Ok till here
Now i want to validate the day of birth in this form of dd/mm/yy !
But how to ?
I store the input into one variable $thedate.. par example,
Code: Select all
$thedate = $_POST['birthdate'];
Thanks