How to add a dynamic id through different URLs

8 replies
Hey guys,

I am trying to make a small marketing funnel of about 3 webpages but what I am trying to do is to be able to run an affiliate id through the pages too.. eventually landing on the offer with the url -

htt......?id=xyz

Someone had remarked to use this code instead of the id <? echo $_GET['s1'] ?> (changing the s1 for id is what I have been doing). But I can't get it to work.

Any ideas how I can get the id from a url to echo into the one that they click through on (in the page)?

Many thanks in advance
#add #dynamic #urls
  • Profile picture of the author Jason Z
    Is this a wordpress site, or static site? If it's a static site are your pages .html or .php?

    That' can make a difference for your code.
    Signature
    Co-Founder of the Local Profit Model Training Program for Offline Consultants

    Jason Zimmerman is an offline marketing and consulting professional. He has been developing web sites and digital marketing plans for local businesses since 2000.
    {{ DiscussionBoard.errors[5107293].message }}
    • Profile picture of the author Brandon Tanner
      Alright, let's say your affiliate link looks like this --> www.YourSite.com?id=xyz

      On your landing page, you would link to page 2 like this...

      <a href="page2.php?id=<?php echo
      $_GET['id']; ?>">Click here</a>

      Then on page 2, you would link to page 3 like this...

      <a href="page3.php?id=<?php echo $_GET['id']; ?>">Click here</a>

      Now on your final page (page 3), wherever you want to display the id on that page, do this...

      <?php echo $_GET['id']; ?>

      Don't forget that each of these pages have to have a .php extension, or it will not work (ie index.php, page2.php, page3.php, etc).
      Signature

      {{ DiscussionBoard.errors[5107625].message }}
      • Profile picture of the author The4thMarketeer
        Hey Brandon,

        Thankyou for your explanation! This is prob going to sound rather noob, but how do I set up a .php page? The actual affiliate page is .php, just not the ones that I am making.

        Many thanks for your help
        {{ DiscussionBoard.errors[5113372].message }}
        • Profile picture of the author Brandon Tanner
          Originally Posted by The4thMarketeer View Post

          Hey Brandon,

          Thankyou for your explanation! This is prob going to sound rather noob, but how do I set up a .php page? The actual affiliate page is .php, just not the ones that I am making.

          Many thanks for your help
          All you have to do is change the file name extension from .html to .php
          Signature

          {{ DiscussionBoard.errors[5115410].message }}
      • Profile picture of the author imdagame92
        Originally Posted by Brandon Tanner View Post

        Alright, let's say your affiliate link looks like this --> www.YourSite.com?id=xyz

        On your landing page, you would link to page 2 like this...

        <a href="page2.php?id=<?php echo
        $_GET['id']; ?>">Click here</a>

        Then on page 2, you would link to page 3 like this...

        <a href="page3.php?id=<?php echo $_GET['id']; ?>">Click here</a>

        Now on your final page (page 3), wherever you want to display the id on that page, do this...

        <?php echo $_GET['id']; ?>

        Don't forget that each of these pages have to have a .php extension, or it will not work (ie index.php, page2.php, page3.php, etc).
        I have two questions on this:

        1 - How do I set it up so that my whole site is dynamic? I'm in the network marketing niche, and I'd like to build one site, but allow my team members to share the content, but direct the calls to action to their buy links.

        2 - Is there a way to set it up so that the default visitors go to my link? For example, if someone goes to xyz.com, those sales go directly to the link I set as the default?
        {{ DiscussionBoard.errors[8950197].message }}
    • Profile picture of the author The4thMarketeer
      Hey Jason,

      Tbh, I would really like to use it with an optimise press site (wordpress). All of my pages are html bar the last actual page.
      {{ DiscussionBoard.errors[5113364].message }}
  • Profile picture of the author msu
    If you have PHP enabled on your hosting (and you probably have) try just changing the page extension from .html / .htm to .php.
    Signature
    New to WordPress? Save time with my beginner's guide:
    WordPress Step-by-Step
    (for Kindle & Kindle Apps)

    I'm a top-notch WordPress developer: hire me
    {{ DiscussionBoard.errors[5115028].message }}
  • Profile picture of the author quickway
    Look im helping people build websites with insta builder and word press and i even offer insta builder for my teamates pm me details if interested
    {{ DiscussionBoard.errors[9860782].message }}

Trending Topics