Please help me with a simple code

2 replies
Hello, I'm using an online affiliate management software and when affiliates join my program they receive a link similar to the the one below to promote my product.

http//mysite.com?oid=affiliateid

When the affiliate sends a visitor using their affiliate link, is there any simple code that I can set to have the next page they visit on my site grab the affiliateid from the affiliate url and attach it to the end of the next page url?

I hope that I've been able to explain this clear so that someone can help me with this. Thanks!
#code #simple
  • Profile picture of the author AdwordsMogul
    You try something like this:

    <?php
    //This goes on top of your page
    $oid = $_GET['oid'];

    // Then you can create a link like this:

    $new_link = '<a href="http://www.yourdomain.com/page?oid='.$oid.' >Link Text</a>';



    ?>Then where ever you want to place the new link just add
    <?php echo $new_link; ?>

    Note to moderator: I tried wrapping the code but the page just kept going blank
    Signature
    "Those who can - DO IT. Those who can't, say it's impossible."
    Jean Paul a.k.a AdwordsMogul
    PHPDevelopers.net - Top of the range PHP developers

    Easy Link Saver - Are you tired of the pain of constantly searching for your affiliate links? ( Chrome extension - FREE )
    {{ DiscussionBoard.errors[4087194].message }}
  • Profile picture of the author mologic
    I would use cookies or session objects to track the referral through the duration of the visit..
    Signature
    WTB PR5+ Blog Posts -- Bulk Orders -- PM Me
    {{ DiscussionBoard.errors[4103872].message }}

Trending Topics