title: Check which page called this php?
body: <p>Here is what I'm dealing with:</p>
  
  <p>Let's say I have some php page:</p>
  
  <pre><code>&lt;?php
      // do php stuff
  ?&gt;
  </code></pre>
  
  <p>And I have two HTML pages where the action sends them to this php page. On this php page, I want it to do one thing if it comes from one of the html pages, and something else if it comes from the other. I cannot pass any explicit variables to the php page, I need to check which page called the php.</p>
  
  <p>I have tried:</p>
  
  <p><code>$_SERVER['PHP_SELF']</code> when I access this, it doesn't seem the send the referring page.
  <code>$_SERVER['HTTP_REFERER']</code> this gives the previous page to the one im looking for.</p>
  
  <p>For example:</p>
  
  <p><code>HTML PAGE1</code> form calls <code>php</code> page --> I want some variable in PHP that contains <code>HTML PAGE1</code>.
  <code>HTML PAGE2</code> form calls <code>php</code> page --> I want some variable in PHP that contains <code>HTML PAGE2</code>.</p>
  
  <p>Thanks for the help. Please let me know if there's some way I can clarify the question.</p>