The steps to what I am trying to do are as follows:

User enters 12 digit UPC/UCC (aka Barcode) code into form on web site.

Last digit (the check digit) is dropped from the number entered.

This formula is run on the remaining 11 digits: http://www.uccouncil.org/ean_ucc_s.../cdc.html#UCC12

the result is compared to the dropped digit.

If equal, echo “Hooray!” because I have bashed my head over this for days;
Can anyone provide any tips, or point me to something like this that may already exist? I have found plenty of check digit calculators, but no validators.
Thanks!