title: Header location not redirecting after form post
body: <p>I just really can't figure out what I am doing wrong. Localy it works fine but when I  use it on my websever it doesnt work anymore. so if anyone can help me figure out what mistake I am making it would really help me out.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;html&gt;
  &lt;head&gt;
      &lt;link rel="stylesheet" type="text/css" href="style.css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h1&gt;poll met cms&lt;/h1&gt;
    &lt;form class="user-form" action="" method="post"&gt;
        inlognaam: &lt;input type="text" name="inlognaam"&gt;&lt;br&gt;
        wachtwoord: &lt;input type="password" name="wachtwoord"&gt;&lt;br&gt;
        &lt;input type="submit" name="opslaan"&gt;
        &lt;a href="./registratie.php"&gt;Register&lt;/a&gt;
        &lt;a href="./wachtwoord_vergeten.php"&gt;Wachtwoord vergeten&lt;/a&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  
  &lt;?php
  ob_start();
  session_start();
  require_once("./database.php");
  $db = Database::getConnection();
  
  if(isset($_POST['opslaan'])) {
      if($_POST['inlognaam'] != '' &amp;&amp; $_POST['wachtwoord'] != '') {
          $inlognaam = $_POST['inlognaam'];
          $wachtwoord = $_POST['wachtwoord'];
  
          $result1 = $db-&gt;prepare("SELECT * FROM gebruiker WHERE inlognaam = '".$inlognaam."' AND  wachtwoord = '".$wachtwoord."'");
          $result1-&gt;execute();
          $result = $result1-&gt;fetchAll();
  
          if($result)
          {
              $id = $result[0]['id'];
              $_SESSION["logged_in"] = true;
              $_SESSION["inlognaam"] = $inlognaam;
              $_SESSION["id"] = $id;
  
              header("Location: ./admin.php");
              exit;
        }
      }
  }
  ?&gt;
  </code></pre>