PHP referral system help

Discussion in 'PHP' started by phoenixrayne, May 31, 2008.

  1. #1
    Hey guys i have a site with a referral system. The site generates a referral link for each user to use. However when the link is used the referrers name isnt auto generating into the text field in the signup form. Im not familiar with grabbing info from a link and auto submitting to a form any help with this would be appreciated.
     
    phoenixrayne, May 31, 2008 IP
  2. Agent_Smith

    Agent_Smith Well-Known Member

    Messages:
    890
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    145
    #2
    Agent_Smith, May 31, 2008 IP
  3. swordbeta

    swordbeta Banned

    Messages:
    225
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes, use GET.
    So the text field HTML would look like this;
    <input type='text' name='ref' value='<? echo $_GET['id']; ?>' />
    HTML:
    Good luck phoenixrayne.
     
    swordbeta, May 31, 2008 IP
  4. phoenixrayne

    phoenixrayne Peon

    Messages:
    154
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    ive tried incorperating that into the signup page.. output is only "/" in the field. Here is the code im using. along with the link structurel.

    
    <tr><td><b>Referrer</b>:</td>
      <td><input type=text name=referrer value=<? echo $referrer = $_GET['nickname']; ?> /></td>
    
    Code (markup):
    here is the referral link im trying to call the nickname from.

    XXXX.com/index.php?x=signup&referal=phoenixrayne

    link structure in the code from the referral system is
    
    http://elitemobb.com/index.php?x=signup&referal=$stats_array[nickname]</td></table>";
    
    Code (markup):
     
    phoenixrayne, May 31, 2008 IP
  5. swordbeta

    swordbeta Banned

    Messages:
    225
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Please use this:
    <tr><td><b>Referrer</b>:</td>
      <td><input type='text' name='referrer' value='<? echo $_GET['referal']; ?>' /></td>
    </tr>
    Code (markup):
    The Query String is called referal, so I don't see why your using nickname.
     
    swordbeta, May 31, 2008 IP
  6. gigamike

    gigamike Active Member

    Messages:
    165
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #6
    Hi,

    try echo $_SERVER['QUERY_STRING'];

    Thanks,

    Mike

     
    gigamike, May 31, 2008 IP
  7. phoenixrayne

    phoenixrayne Peon

    Messages:
    154
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7

    SWEET! it worked... thanks a million. :D
     
    phoenixrayne, May 31, 2008 IP