Q&A

Q1: You mentioned validating credit card numbers with checksums earlier; where can I find out more?
A1: There is a formula, called the Luhn check, that you can apply to credit card numbers to check for mistyped numbers. Information on using the Luhn check can be found at

http://www.beachnet.com/~hstiles/cardtype.html

You can also use the Business::CreditCard Perl module to verify credit card numbers using the checksum formula for each credit card type rather than writing the code to do it yourself.

Get Sams Teach Yourself CGI in 24 Hours, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.