Support » Plugins » Hacks » Need help with Variables

  • Hi,

    Through my site I offer many affiliate adds and would like to be able to track which user goes through them and purchases something. I have talked to the affiliate managers and they said I can track that information through a Sub ID in the add. All I have to do is set a variable in the Sub ID field so it is populated with the users username when they sign in. I am using the Wishlist Member plugin to handle the login for the site (Wishlist Member uses the WordPress databases to store the user information).

    I have not done any programing in my past so I really don’t know what I am doing. But from searching WordPress I found that the following code can call user variables (in this case the users username)

    <?php global $current_user;
          get_currentuserinfo();
    
          echo 'Username: ' . $current_user->user_login . "\n";
    
    ?>

    If I was to place the above code in place of the bolded “defaultmemberid” would it place the users username in the Sub ID area when they login?

    <a>defaultmemberid"" >LinkShare Referral Program</a><img src=""http://ad.linksynergy.com/fs-bin/show?id=/FYI6fQ9PWs&bids=7097.10000015&type=3&subid=0>

    If that is the correct code to put in there could multiple users be logged in at the same time and each have their username in the adds displayed to them?

    If that is the wrong code any help you can give me to point me in the right direction to accomplish this would be much appreciated.

    Thanks,
    Tom

    [Please post code & markup between backticks or use the code button. Your posted code has now been permanently damaged by the forum’s parser.]

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Need help with Variables’ is closed to new replies.