how to make sure that a to date is not prior of the from date in php code example Example: php date is before if( strtotime($database_date) > strtotime('now') ) { ...