Validate Credit Card


Checking Visa Credit Card Number for Valid Number

"; $VisaCardNumber = str_replace("-", "", $VisaCardNumber); if (preg_match ("/^4(\d{12}|\d{15})$/", $VisaCardNumber)) { echo "

Credit Card Number " . $VisaCardNumber . " is a valid Credit Card Number.

\n"; } else { echo "

Credit Card Number " . $VisaCardNumber . " is not a valid Credit Card Number.

\n"; } } ?>