• Hi,
    I need to capture a referring URL and keep it for reference later.
    I’m new to programming.
    I know I can capture the referring URL with
    $orig_post_url = wp_get_referer();

    The particular PHP page is a product page and updates when someone adds an option to their cart…a message indicates that the item has been added upon updating. However the referring URL then is that page. I need the original url to NOT be overwritten.

    How can I accommodate that?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    You can try dumping $_SERVER to see if anything useful is there, but from the sounds of it you need script on the products pages to save that page’s referrer somewhere where your current script can access it. Perhaps a cookie or session variable.

    Thread Starter dwest100

    (@dwest100)

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘referring URL question’ is closed to new replies.