Validating Form Submittion
Good morning folks :)
I've created a logging tool for a client that logs specific key codes that credit customer accounts for a contest. These codes are unique to each email address which are used to login to the site so that the customer can track their progress in the contest. I have managed to disable entry duplicates. (I found that clicking the REFRESH button on the browser was inserting a record!!!) I used a server side validation to ensure that any additional inserts for duplicates was disabled.
The special codes that are redeemed are randomly generated and are then stored in a table and are associated with a customer record_id. I need to be able to look at this record and make sure that ONLY valid codes that are stored with the customer record are recorded. My code validation process right now will refuse duplicates, but if someone was to make up a bogus code, the application would credit the customer for using that bogus code.
How do I create an additional server side validation to look my codes table and make sure that only codes listed are approved and credited?