title: Need advice about transfering HTTP_REFERER to another page
body: <p>So I'm currently trying to save page1.php's <code>HTTP_REFFERER</code> as a variable and transfer that variable to another page. I've tried using <code>$_SESSION[]</code> and <code>$_COOKIES[]</code> methods but it didn't work. <code>page2.php</code> shows referrer as <code>page.php</code>.</p>
  
  <p>Any suggestions?</p>
  
  <p>page1.php : </p>
  
  <pre><code>&lt;?php session_start();
  $variable1 = $_SERVER['HTTP_REFERER'];
  $_SESSION['ref'] = $variable1;
  </code></pre>
  
  <p>page2.php :</p>
  
  <pre><code>&lt;?php session_start();
  $_SESSION['ref'] = $variable1;
  echo $variable1; ?&gt; 
  </code></pre>