SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2008
    0 Post(s)
    0 Thread(s)

    Cookie setting/deleting issue

    Alright so I have a website where users get referrals. If someone visits the site using a referral link, their is a cookie placed so that the user that visited the site signs up under the person that is in the cookie.

    Here is a scenario where there is an issue:

    Person A visits the site under Person B's referral link. Therefore, a cookie with person B's username is placed on Person A's computer.

    Now, if Person A visits the site under Person C's referral link, Person B's referral link is still the cookie.

    I have tried to remove the cookie and it works but not instant. Like in the scenario I just gave you, Person A would SEE Person B's cookie, and if the page refreshed, then Person C's cookie would show up.

    Is there any way around this? I know PHP is a server side language and that might be the overall issue, but if it's not, please help me! Thanks in advance.

  2. #2
    Use The Cloud
    Join Date
    Jan 2006
    Boise, ID
    0 Post(s)
    0 Thread(s)
    1. Shouldn't the first referrer get credit?
    2. You can just add a conditional override to wherever the user sees who referred them. If you're going to set a cookie on that page load, then simply override what ever data you base on that cookie.
    Brad Hanson, Web Applications & Scalability Specialist
    ► Is your website outgrowing its current hosting solution?
    ► PM me for a FREE scalability consult!
    ► USA Based: Available by Phone, Skype, AIM, and E-mail.


Posting Permissions

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