Dynamic Links with php using affiliate ID

I’m an extreme newbie so please be nice! Also please explain thoroughly how to do each step as I’m basically a beginner.

I want to create a page on my worpress website. This page would be used by a number of affiliates that would place their affiliate ID in the url and the button at the bottom would take their ID and place it in the link that directs the viewer to the company website.

The affiliate id needs to be before the company website like so:
affiliateid.companyname.com

My understanding of php is that the website the affilites and viewers would see would be something similar to:
www.mywordpresswebsite.com/page.php?id=affiliateid

As it’s a wordpress website I would then need to edit the php files. Which are found under Appearence – editor – index.php

Then I would need to insert code that would look similar to this:

<a href="<?php echo $_GET['id'].companyname.com; ?>">Link Text</a>

I know the above code is probably wrong or needs more. Please correct it.

Then I will need to have a button on my page. This is where I’m also a bit stuck as I’m using a front end page designer I’m not sure how to put in the link that references the company website and grabs the id from the url. That link should then take people to affiliateid.companyname.com

I would be extremely grateful for anyone who is willing to help me. I just can’t understand how to put this coding in from the other questions people have asked.

Thanks in advance. 😀

Read more here: Dynamic Links with php using affiliate ID

Leave a Reply

Your email address will not be published. Required fields are marked *