I have 2 fields that take in date fields (MM/DD/YYYY) and I need to make sure that the second date input is correct in that it comes after the first date. For example: 12/12/2005 11/12/2005 this would result in a fail, because the second date (11/12/2005) comes before the first date (12/12/2005).
Change the date to a timestamp and then compare (they are just ints). if (mktime (0,0,0,12,12,2005) <= mktime (0,0,0,11,12,2005)) { // fail } else { // dates are good } PHP: