The script returns a boolean value of true or false based on the credit card number / credit card type combo you provide it. So for a form you could do something like this…
// Check for form submission
if($_POST['myformsubmitted']) {
// Use the checkCreditCard function to validate the credit card number
if(checkCreditCard($_POST['ccnumber'], "Visa", $ccerror, $ccerrortext)) {
// Returned true (success)
echo "Success!";
}
// Returned false
else {
echo "Validation failed!";
}
}