Welcome Guest, Not a member yet? Register   Sign In
Create custom link url for users
#6

I agree with JayAdra. It shouldn't be that hard to accomplish.

In your users table add 2 fields; referral_code & referral_count.

When adding users to the table create a random string using the string helper and set the referral_code to that string and set the referral_count to 0 as default.

Then when the user wants to refer someone provide them a link like Jay said: http://www.mysite.com/refer/4Fg5GdXC45 and when it gets visited update the user who has 4Fg5GdXC45 as their referral_code and +1 to the referral_count.

You can grab the last piece of the link using the URI class.
Reply


Messages In This Thread
RE: Create custom link url for users - by JayAdra - 04-24-2017, 08:09 AM
RE: Create custom link url for users - by keithmclaughlin - 04-25-2017, 10:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB