Forums

display url variables (4 posts)

  1. drazek
    Member
    Posted 2 years ago #

    i'm trying to show values from my referring url on any wordpress page

    for example if i have: http://www.mydomain.com/?firstname=JOE&lastname=DOE

    i would like "JOE" or/and "DOE" to be displayed anywhere on the page

    has something like this been done before?

    does anyone know?

    thank you

  2. drazek
    Member
    Posted 2 years ago #

    anyone?

  3. KristoferN
    Member
    Posted 2 years ago #

    http://www.mydomain.com/?firstname=JOE&lastname=DOE

    <?PHP
    $firstName = $_GET['firstname'];
    $lastName = $_GET['lastname'];
    ?>

  4. VerticalCashew
    Member
    Posted 2 years ago #

    Hey drazek, did you ever find a good solution to this, or was the PHP KristoferN provided good enough? I am needing to do the same basic thing upon the visitor hitting the page, but need to do a lookup of the persons first and last name before printing it.

    For others just reading this, the example is that if we have 10 pages on the site and a visitor links in by the affiliate ID (ex: /page-10/?ref=121 ), we need to look up that referrer and print the name on the page... as well as leave the referring ID at the end of the url string when they browse the 10 pages prior to buying.

Topic Closed

This topic has been closed to new replies.

About this Topic