Inserting Username Into Url

Discussion in 'Databases' started by fiasco, Feb 2, 2013.

  1. #1
    I am creating an affiliates-only site for an affiliate marketing program, in order to share marketing materials and links not available to them in the regular panel they use to check their stats. I can create each username from my list of affiliates to match their affiliate ID in their account - for example "1489820" - and when they login to my WordPress site I want the links they see to show their own ID in the right place so they can grab their links and use them from the marketing pages I will create.

    A typical link (where the XXXXX needs to be replaced with their username) would be:

    http://www.1shoppingcart.com/app/?af=XXXXXXX&u=http://marketauthority.com/global-trading-dispatch/join/ so I need the this link to show to username 1489820 as:

    http://www.1shoppingcart.com/app/?af=1489820&u=http://marketauthority.com/global-trading-dispatch/join/

    Can someone point me in the right direction?
     
    fiasco, Feb 2, 2013 IP
  2. Tom Thumb

    Tom Thumb Notable Member

    Messages:
    1,529
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    215
    #2
    Your Thread is probably in the wrong area to be honest. Should be in PHP/Programming..

    You could take a look at :

    http://www.colinjmorgan.com/add-custom-user-fields-in-wordpress/

    You need a custom Wordpress field so that each user has their affiliate ID in a field associated with them. You could then call that value when building their Affiliate Link.

    HTH
     
    Tom Thumb, Feb 6, 2013 IP