Checking Credit Card Expiration

 
<?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.";
}
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.