title: Show Log out if user logged in.
body: <p>I have set up a PHP login form within dreamweaver. When dreamweaver inserted the code it worked fine but what I want my head.php file to do is detect if user is logged in. If the user is logged in i want it to Display Logout and If they are not logged in to display login. This is what I have tried..:</p>
  
  <pre><code>if ($isValid = true) {
      include 'head/hp1.php';
      ?&gt;
      Login
      &lt;?php
      include 'head/hp2.php';
  }
  else {
          include 'head/hp1.php';
      ?&gt;
      Logout
      &lt;?php
      include 'head/hp2.php';
  }
  </code></pre>
  
  <p><a href="http://bit.ly/1naqwUo" rel="nofollow">this</a> is the full code.</p>