
*This could be achieved simply by entering "type=\"hidden\"" in the HTML Attributes but this technique is worth demonstratin as it can come in useful every now and then.
Read this document if you want to know why it is so useful.
$date Exploded = explode("-", $date); //Our $date Exploded array should contain three elements. = 3) //For the sake of clarity, lets assign our array elements to //named variables (day, month, year).
$day = $date Exploded[2]; $month = $date Exploded[1]; $year = $date Exploded[0]; //Finally, use PHP's checkdate function to make sure //that it is a valid date and that it actually occured. checkdate($month, $day, $year)) If you run the PHP code above, you’ll see that the final check results in an exception being thrown. Because the 31st of February, 2016, never actually occurred (the month of February will only have 29 days at most).
The date field could be a for a hotel booking or the user could be selecting their date of birth.


We now have a dynamic value on every form accessible to Java Script.
//For example purposes, I am using an invalid date.
$date = "2016-02-31"; //Firstly, we need to "break" the date up by using the explode function.
This is a tutorial on how to validate user-submitted dates using PHP.
In many cases, your users will have to select a date before submitting a web form.
An accident happens which leads Arah to accept a contract to work in Australia, she leaves Migo heartbroken and devastated.
Meanwhile, in Germany a quiet boy is forced into the Hitler Youth.
Join a live online conversation in Russian Roulette video chat with girls and boys.
You can sign up completely free and check out our members profiles for yourself.
If there’s anything I can do to make a change, then I’m going to do it. Fox News: What is one memory from “The Price is Right” you will never forget?