Dave's Brain

Browse - Programming Tips - How do I get the URL of the calling page?

Date: 2008nov5
Language: php

Q.  How do I get the URL of the calling page?

A.  Like this:

$calling_page = $_SERVER['HTTP_REFERER'];
Notice that its spelt wrong. Should be "referrer" instead of "referer". Oh well, that's the way it is now.

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.