Jump to content

Database Query Question: Affiliate code on a different page than affiliates


Writers Hosting

Recommended Posts

Hi everybody,

 

I'm trying to work out a way to bring in the affiliate code to a page that is not affiliates.php.

 

What I'm doing, is creating custom pages for different banner sizes, so a user can go to a single page to find, for example, all the text ads or 468x60px banners.

 

I'm adding the usual affiliate code into the page - [AffiliateLinkCode] - but I don't know what to do to call in the correct information from the database to replace that with the actual affiliate code for each user.

 

This is the reply that I received from WHMCS support, but it makes no sense to me (something I need to learn):

 

Variables from one template file will not work in your custom page unless you actually write the code to calculate and define those variables. So obviously if you want to get the affiliate ID for example, you would need to query the tblaffiliates table of the database, doing a lookup based on the currently logged in client ID which is stored in $_SESSION['uid']. You will need someone familiar with PHP and development to be able to help you with this as it can't be done by a non coder, but otherwise is very simple and straightforward.

 

Can anybody tell me what I would need to add to the php/tbl files to make this work please?

 

Once I get this figured out, I'll thank the community by putting together the files and releasing them for all to use, as I think this isd a good way to make things easier for our affiliates.

 

Thanks,

 

Joe

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated