1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

transferring referral ID

Discussion in 'PHP' started by wing4, Jun 4, 2005.

  1. #1
    hi, I am new here and completely blind with php.
    I have a problem with transferring a ref ID and need a detail help.
    I have tried to read php tutorials but couldn't get my way out.

    Say my url site abc.com/index.php?ref=12345
    I want the user keep getting the "?ref=12345" in the next page's url after clicking a link in the first(index) page. there is only one link in the first page.

    so what phpcode should I put in there?

    thanks,
    -wee-
     
    wing4, Jun 4, 2005 IP
  2. SpeedyDomainRegistration

    SpeedyDomainRegistration Peon

    Messages:
    170
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    YOu can use this code to get the referal id.

    $ref=$ref;
    Code (markup):
    You can then add that to any url link generated within php <?php and ?>

    <a href=http://www.yoursite.com/page1.php?ref=$ref>click</a>

    or


    <a href=http://www.yoursite.com/page1.php?ref=<?php echo $ref; ?>>click</a>

    If the link is not within the <?php and ?>

    In your case, you'll probably be using this.

    
    $ref=$ref;
    echo "<a href=http://www.yoursite.com/page1.php?ref=$ref>click</a>"
    
    Code (markup):
     
  3. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #3
    <a href="nextpage.php?ref=<?= $_GET["ref"] ?>">link</a>
    PHP:
    J.D.
     
    J.D., Jun 4, 2005 IP
  4. wing4

    wing4 Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    yaw, it works!!
    dunno it's so simple.

    thanks alot guys.
     
    wing4, Jun 5, 2005 IP