title: How to call an HTML file from PHP
body: <p>I am trying to create an administrator login page using HTML and PHP (the PHP is here for several other purposes too) where once the administrator logs in, an HTML file needs to run.</p>
  
  <p>I will include my login page code below. I need to insert the command in the <code>if</code> statement in the PHP file. I tried different ways of using the include function; maybe I am not using it right.</p>
  
  <p>Code:</p>
  
  <h3>PHP file</h3>
  
  <pre><code>?php
  
      $username = $_POST['username'];
      $password = $_POST['password'];
  
      if ($username =='admin' and $password =='Parthurnax')
      {
          include 'test.html';
      }
      else
      {
          echo 'you are not the admin';
      }
  ?&gt;
  </code></pre>
  
  <h3>HTML file:</h3>
  
  <pre><code>&lt;html&gt;
      &lt;body&gt;
          &lt;div align="center"&gt;
              &lt;form action="page.php" method="POST"&gt;
                  &lt;b&gt;Username:&lt;/b&gt;&lt;input type="text" name="username"&gt;&lt;br&gt;
                  &lt;b&gt;Password:&lt;/b&gt;&lt;input type="password" name="password"&gt;&lt;br&gt;
                  &lt;input type="submit"&gt;
              &lt;/form&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>