Need a little help just to be put on the right track...

Some customers will buy a membership card and others, who bought a card last year, will renew it from the store.

I made a product as a renewal. It's less expensive than the first membership card so I needed to check if they really had their card last year. As a verification, I made an attribute asking for a text code to enter, which is their last year card number.

I currently manually compare the data with an Excel sheet to see if they are on it then I can change the status to "accepted" of "refused". I I can put these Excel data into a DB table and then have the text entered compared with it.

I think it could be too long and too heavy coding for me to have the status automatically changed depending on the result so the other option could be that if the data is found an email "x" could be send to the store administrator. If it's not the email "y" could be send.

Any hint on how implement this?