php check credit card expiration code example
Example: php check credit card expiration
$expires = DateTime::createFromFormat('my', $_POST['expMonth'].$_POST['expYear']);
$now = new DateTime();
if ($expires < $now) {
echo 'Expired!';
}
$expires = DateTime::createFromFormat('my', $_POST['expMonth'].$_POST['expYear']);
$now = new DateTime();
if ($expires < $now) {
echo 'Expired!';
}