If the data is valid, the page displays normally. Then it uses an include statement to run the previous script again. Each page checks for this condition. But if there's a value, the script prints an error message and displays itself to the browser. Credit card validation is tricky.
Verification checks the card number for certain criteria.
Each type of credit card has its own number format. Currently, the cart accepts only Visa and MasterCard in its user interface. However, the credit card validation routine recognizes American Express, Novus, and other cards. It then matches the card type it finds against the card type the user claims. However, you still have to enter a valid expiration date.