PHP - Http_referer
I have a form that will e-mail a message that includes the referring page URL. The problem is that if someone makes a mistake on the form it changes the value of the referrer from the correct referring URL to the current page. Please help!
Code: [Select] <input type="hidden" name="referer" value="<?php echo $_SERVER['HTTP_REFERER'] ?>" /> Similar TutorialsIS there a way to include the GETs for HTTP_REFERE? I often use it as a "go back" link but it doesn't include the GETs that were in the url which is a pain... Any ideas? This is what i use: Code: [Select] <a href="<?php echo $_SERVER['HTTP_REFERER'];?>">Go Back</a> Hi there, i have 3 pages: 1. index.php 2. iframe.php 3. output.php iframe.php is within index.php and in iframe.php there's a form with input fields. Form is including output.php for sending the information. Whenever someone come to index.php, my HTTP_REFERER get's reffer of index.php instead of previously visited page (before my index.php)... how can i fix this? Please help! How can I get http_referer to retrieve the anchor in the url? It keeps url variables, but it does not get the anchor. Example: http://example.com/ex.php?id=10#tab=3 All http_referrer catches is http://example.com/ex.php?id=10 code: Code: [Select] $refer = $_SERVER['HTTP_REFERER']; <script type="text/javascript"> <!-- window.location = "<?PHP echo"$refer";?>" //--> </script> why does $_SERVER['HTTP_REFERER'] not get populated when a redirect is given using header( location:........) i am trying to redirect back to the login page if a user hasnot logged in yet but then re-direct back to the page they came from. Hi,
I'm using this code to redirect visitors who are coming from another site (clicking on my ad on that site) to a page in my site where I can track them:
$referrer = $_SERVER['HTTP_REFERER']; if ( strstr($referrer, '://example.com/shop') ) print ('<meta http-equiv="refresh" content="0; URL=http://www.mysite.com/1.php">');The problem is that, by this code I can only redirect those who are coming from example.com/shop, but I need to redirect visitors coming from any sub directory or subdomain from example.com, not only a specific url in example.com Is there any solution? Thanks |