Hello,
This scrip will serve as a way to track points for users.
Script Function.
User: inputs email and a number
Script: checks for valid number and adds points
Simple coupon code:
Coffee shop (STORE) number #001
Bakery shop (STORE) number #002
Sample code: 001324
001 is the store number
324 is a random number
- First Visit
User gets coupon code from coffee shop "001" and redeems it in browser.
If valid coupon, than automatic account is created using email as user name (captcha is necessary)
And one point is given to user.
If the number is not in database than a message is displayed.
- Second Visit
If user returns with another valid number than another point is given until user accumulates 10 points.
- Third Visit
If user returns with another store number "002" and valid coupon than process is repeated using existing account.
User can have unlimited (STORES) with same account.
If user accumulates 10 points of a STORE "example 001" coffee shop, than a printable coupon is email and the point count is reset with history.
Thank you for your time