Results 1 to 2 of 2

Thread: referral system

  1. #1
    Join Date
    Jul 2009
    Posts
    15

    referral system

    How is a referral system made with php.

  2. #2
    Join Date
    Oct 2010
    Location
    Montreal, Quebec, Canada
    Posts
    44
    Unfortunately that question is fairly vague but I will try and answer it none the less for you.

    Generally an HTML form is made where a user fills out his contact details to sign up for a referral program.
    The form will post it's results probably to some sort of server-side code for example it could be some PHP code.
    The PHP code validated the data and the writes the customer details to a database also generating a unique identifier for that user. This could be numbers or letters or both as long as it is unique and stored somewhere in the database and associated with the member that signed up.
    You will then provide to the member a link that they can then share to others. This is their unique referral link. It can be something like "http://www.yoursitehere.com/?ref=uniqueid"
    Whats important is that there must be some code running on every page of your site that checks to see if the "ref" query string variable exists and if it does to store a client-side cookie to say that this is a refferal from whoever that unique id belongs to.
    When the refferree actually completes and action on your site for example buys something, you then check to see if the client-side cookie exists and if it does, you lookup that unique id and then associate the commission to that user.

    I really hope that I have just answered your question.
    More than just a simple web hosting service. Our goal is to provide your business with a Web Presence.
    Affordable Hosting Solutions, Domain Name Registration, E-Mail Marketing Solutions, Social Media Networking, and more.
    Let us show you how you can be your own webmaster

Similar Threads

  1. WANTED: Coding for Referral system website
    By wethegreatest in forum Freelancing
    Replies: 0
    Last Post: 23 Nov 2008, 07:14 PM
  2. Open Source Cart System
    By TomWar in forum General Questions
    Replies: 0
    Last Post: 20 Mar 2006, 10:11 PM

Posting Permissions

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