mercredi 26 octobre 2016

Draw with random numbers and limit the # of winners

I need to perform an activity, that is a draw for a duration of three days. But budget I have to limit the # of winners, for example of the 10000 visitors I can only reward 300. I was thinking create 300 random numbers, store and record the visit of users, then validate whether the visitor # is equal to any of those numbers in a PHP script and give the prize. Was it the right way? Thank you very much in advance, waiting for any comments, Good day!




Aucun commentaire:

Enregistrer un commentaire