How to add a dynamic id through different URLs

by 8 replies
11
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
#programming #add #dynamic #urls
  • 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.
    • [2] replies
    • 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).
      • [2] replies
    • 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.
  • If you have PHP enabled on your hosting (and you probably have) try just changing the page extension from .html / .htm to .php.
  • Banned
    [DELETED]
  • 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

Next Topics on Trending Feed