Checking a date is in the future
Posted: Tue Jul 12, 2005 11:36 pm
I have 3 text boxes, day, month and year so I end up with somthing like
I want to check that the date is not only valid (via checkdate()) but also that it is in the future.
Also is there a simple way to add an integer amount of year (1, 2, 3... etc) to this date? For example if I added 1 to 1 Jan 2006 I'd get 1 Jan 2007.
Code: Select all
/**
* Day = 1-31
* Month = 1-12
* Year = 2005-whenever
*/
$day = $_POST["day"];
$month = $_POST["month"];
$year = $_POST["year"];Also is there a simple way to add an integer amount of year (1, 2, 3... etc) to this date? For example if I added 1 to 1 Jan 2006 I'd get 1 Jan 2007.