I am creating a simple website and i need a simple code for user referral (user can refer his friends and if his friend is registered he get some points for it )
and also it must be entered in the databases...
help me friends....thanx in advance
Help:Need a simple php referral code
Moderator: General Moderators
Re: Help:Need a simple php referral code
I would say make an array and select a random amount of picks from it, then store that in the database as the referral code. Or you could do something like this...
You now have 5 random numbers between 1 and 100, you can store $rand in the database as referral code and use it however you want.
Code: Select all
$num = range(1, 100);
$rand = array_rand($num, 5);