title: PHP Login Page Redirect
body: <p>this code is incomplete and I need it to redirect to a page called mainpage.php with hardcoded information for the username and password. Here's the code.</p>
  
  <pre><code>&lt;?php
  session_start();
  $username="user";
  $password="123";
  
  if($_POST['username'] == $username &amp;&amp; $_POST['password'] == $password)
  ?&gt;
  
  &lt;html&gt;
      &lt;head&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div style='text-align:center'&gt;
          &lt;h3&gt;Welcome To Kontak&lt;/h3&gt;
          &lt;/div&gt;
          &lt;hr /&gt;&lt;br /&gt;
          &lt;form id='login' action="" method='post' accept-charset='UTF-8'&gt;
              &lt;fieldset style="width:550px"&gt;
              &lt;legend&gt;Admin Login&lt;/legend&gt;
              &lt;input type='hidden' name='submitted' id='submitted' value='1'/&gt;
  
              &lt;label for='username' &gt;UserName:&lt;/label&gt;
              &lt;input type='text' name='username' id='username'  maxlength="50" /&gt;
  
  
              &lt;label for='password' &gt;Password:&lt;/label&gt;
              &lt;input type='password' name='password' id='password' maxlength="50" /&gt;
  
              &lt;input type='submit' name='submit' value='Submit' /&gt;
              &lt;/fieldset&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>