Forum Moderators: coopster
I've HTML Form contain Date Field, i use it to store upcoming Events.
i'll Check Posted Date, if it Equal or Bigger than Current Date i'll store it into DB else i'll display error MSG.
I need to compare HTML Date (Date Variable Came From HTML Form).
I want to Compare HTML date with Couurent Date.
Date like this : 2005-01-09 // yyyy-mm-dd
How i can deal with posted date and current date as date not string? How i can Do comparing between this two Variables?
i try to do this by comparing Year with Year, Month with Month, Day with Day...., but it's confused me.
So i like to receive your suggestions, opinions.
CoOL Greetings 2 All.
Nassar
What you need to look into are the PHP date [uk2.php.net] functions.
To compare the data you have specified, use:
date("Y-m-d");
Hope that helps.
it is Ok now, thanls a lot.
CoOL Greetings
Nassar