Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New Coder
    Join Date
    Dec 2010
    Posts
    19
    Thanks
    3
    Thanked 0 Times in 0 Posts

    How to add a referrer system in current system?

    I have a website with simple signup sytem using php web pages and mysql database.
    I add a line in current signup php page to include reffer member like:
    username:
    pass:
    email:
    referred by: ?
    etc..

    Now i want this:
    When visitor enter a name in "referred by" field then system checks whether that name is present in db or not. If name is present then add 1 value in profile of that user who referred this visitor.

    User profile should look like this:
    No. of referrals: 1 (number of member joined bring by you)

    Should i need to create a new field for this, like "referrer" in users table? if yes then how?

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    I would create a new table to store who did the referring, who was referred, and the date/time of the referral. Then do a count() on the table whenever the number of referrals is needed for display or whatever.

    If you store only a number and increment that number, there's a chance someone will figure out how to exploit the system and increment the number (perhaps by repeatedly submitting the signup form? who knows) and that kind of exploit would be easily spotted and corrected if you had all referrals stored in a separate table. Just storing a number would be much more difficult to correct.

  • #3
    New Coder
    Join Date
    Dec 2010
    Posts
    19
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Please tell me step by step, what u will like to do to add referrer system securely.
    Displaying no. of people bring by user will be ok and displaying all usernames of people bring by user in his profile will be more helpfull

  • #4
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Um.. ok...

    Step 1. Create referral table
    Step 2. Use it

    Hope that was helpful?

  • #5
    New Coder
    Join Date
    Dec 2010
    Location
    Orlando, FL
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I love how people come on here practically wanting others to do the coding for them.

    We are willing to help you WITH your code, not WRITE it for you.

    And it's not hard to search google either, maybe you should look into it.
    http://www.google.com/#q=php+affiliate+system

    And my first result:
    http://www.devshed.com/c/a/MySQL/Bui...m-in-PHPMySQL/

    Now come back when you have a question about the coding. How else do you expect to learn? Learn by doing..

  • #6
    New Coder
    Join Date
    Dec 2010
    Posts
    19
    Thanks
    3
    Thanked 0 Times in 0 Posts
    i am not asking for the affiliate system. I just want simple referrer system.
    No body knows how to do that?

  • #7
    New Coder
    Join Date
    Dec 2010
    Location
    Orlando, FL
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by don1081 View Post
    i am not asking for the affiliate system. I just want simple referrer system.
    No body knows how to do that?
    It's PHP and probably under a license where you can modify it however you want, the reason i gave you that links is because you download the file and LEARN from it to create your own.

    I commonly use 3-4 scripts if i can find them and create my own version from learning how they did it with theirs.

    That way when you have a question how to do something, just go to that script or scripts and see how they do it, experiment with it and find a solution that works for you.

  • #8
    New Coder
    Join Date
    Dec 2010
    Posts
    19
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I forgot to tell that i dont know about php. I just buy software and installed it but problem is it do not hv referer system. Thats why i am asking for help here.

  • #9
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,381
    Thanks
    264
    Thanked 32 Times in 31 Posts
    couple things, first be aware of free, free is not always free, sometimes there are hidden back links, open security holes allowing for injection, i even found several that tried to disguise their remote sending of my db information to thier email address on a monthly basis, so just be carefull with free, there are some open source that are good that people actually take the time to do it right and with respect for others, but just be careful is all.

    On another note i have been working on an aff program for several months now designed for the small business and plan to release it this month sometime, its secure and very affordable, i didnt want to rip people off i just wanted to make sure there was something on the market that was respectable and honest for a decent price.. just fyi.. im not gonna mention the name of the software out of respect for this forum, i dont want to solicit here, i want to make it on my own merrit. Just wanted to mention it as an option for you..

  • #10
    New Coder
    Join Date
    Dec 2010
    Posts
    19
    Thanks
    3
    Thanked 0 Times in 0 Posts
    ok, is there any simple code so that i can track referrers?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •