Jump to content


This topic is now archived and is closed to further replies.


need help with dates...

Recommended Posts

Hello... I need some help with dates...

I had the user input a date using 3 different for fields.
When the submit it, i have 3 variable, one for month, one for day, and one for year.
Each one has a number that represents the mont, day and year.

For example, January 1, 2006 would be stored like this..
$month = 1, $day = 1, $year = 2006

I need to do two things.
I already have validation for the correct number of days in each month.

However, I need to check whether the date they entered has not passed already.
To do this, I need to get the current date.
How would I get the current date and separate each part of it into separate variables for month, day, and year?

Also, after I validate each component, how would I convert the date back into the following format...

Could someone please help?


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.