Voucher Code System

navi95

Registered User.
Local time
Today, 15:35
Joined
Jan 3, 2013
Messages
59
Hello all,

I am currently in the middle of creating a database as a means of keeping records of vouchers codes. The idea is....when someone uses a voucher, I will then be able to input the name of the customer with the voucher code in the form.
This is meant to do two processes:
1. Keep a record of who has used a voucher
2. Check and validate the voucher code (the codes are kept in a table).

Now, I have created 90% of the db to input the customers details etc BUT...I am struggling for the validation part. Ideally, the db would also remove the said voucher code from the table so the same voucher code can not be used more then once.

I was going to "pre-install" the voucher codes in the db and then print off the vouchers for distribution. But I am basically tying to make the system so that it cannot be abused (for obvious reasons)

I hope I have given enough information and insight to find a suitable solution...if not...then tell me what you need to know lol :D

Best Regards,

Nav
 
I wouldn't remove the voucher code from the table; you'd lose your history. If you're adding the name to the record when it's used, the presence of a name tells you whether the voucher has been used or not. Your validation would first check that the code exists, then that the name hadn't been filled out. If the code doesn't exist or the name is already filled out, it fails validation.
 

Users who are viewing this thread

Back
Top Bottom