I want to include a verification code on an e-mail form I am creating to prevent spamers from using an automated submission to send e-mails through the form.
I have generated some random code and made a copy of it in a graphic to display to the user. Now I need to save a copy of the code to compare with their form input after submission.
I was thinking I could encrypt a copy of the code and store it as a variable in the form or in a user cookie and then compare it to their input to that after submission. Is there a security flaw in that method? Would there be a better way to do it?
Thanks.