Hello All, im looking for a simple date comparison if statement. I searched google and only found one result worthwhile and for whatever reason I couldnt seem to get it to work, they were using strtotime().. Anyway, just looking for a simple setup like: if ($ThisDate is in the past) { echo "sorry, this date has arleady passed"; } else { echo "Sign Up Now!"; }
Read the following article, it will surely help you http://www.highlystructured.com/comparing_dates_php.html
EDIT: A few seconds too late... strtotime() is probably the easiest way to do it. In which format is your date?
I got it, thanks guys, it took a little modification to the code provided by that webpage but it works awesome now, thanks.