title: Alternate Headers with SSI and PHP
body: <p>I have two headers: one to display for a logged in user, and one to display when logged out/not a member. I also have a footer that should be duplicated on each page.I had the idea to use SSI to include the header and footer.</p>
  
  <p>As of now, we haven't started much server-side processing, and thus don't keep track of logged in/logged out users. As such, for now, I just want to use the page that is including the header to determine which to display. I had the idea to use a PHP file as the header instead of an SHTML file, so I could do some processing to determine which header to show.</p>
  
  <p>So is it possible to determine which page is calling the include with PHP?</p>
  
  <p>Am I going about this all wrong? If so, what solution is more appropriate?</p>
  
  <p>For example, each html page fits this general layout:</p>
  
  <pre><code>&lt;html&gt;
  &lt;header&gt;
      &lt;!-- relevant header calls --&gt;
  &lt;header&gt;
  &lt;body&gt;
      &lt;div id="body"&gt;
          &lt;!--#include virtual="header.php"--&gt;
          &lt;!-- actual page content --&gt;
      &lt;/div&gt;
      &lt;!--#include virtual="footer.shtml"--&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And in header.php I want something like:</p>
  
  <pre><code>&lt;?php
  if(/*page is a non-logged in page*/){
      echo(/*logged out header*/);
  } else {
      echo(/*logged in header*/);
  }
  ?&gt;
  </code></pre>