<?php $expires = mktime(0, 0, 0, $_POST['month'], 1, $_POST['year']); $nextMonth = mktime(0, 0, 0, date('n') + 1, 1); if ($expires < $nextMonth) { print "Sorry, that credit card expires too soon."; } ?>