title: won't redirect anymore - 302 status code
body: <p>Hey guys I got a 302 error code when I want to redirect my page, I'm using <code>header()</code></p>
  
  <p>I searched over google if I could find anything but I found nothing that was relevant for me, so maybe you guys can find it ;)</p>
  
  <p>I get in the <code>network</code> tab in <code>element inspecting</code> 2 responses 1 is of my <code>posting</code> function in <code>jQuery</code> and the other is of the <code>header('Location: index.php');</code> and that gives a response within <code>Reload page to pick up source code for: http://localhost/porfolio/index.php</code></p>
  
  <p>I did the <code>header('HTTP/1.1 200 OK');</code> cuz I saw it would force it to give it a 200 OK code. But when I did that it didn't even give the response of the <code>header('Location: index.php');</code></p>
  
  <p>I just wan't to redirect the person to index.php when he submitted and all fields are oke.</p>
  
  <p><b>Response</b>:</p>
  
  <pre><code>if (!empty($error))
  {
      foreach ($error as $errors)
      {
          echo '&lt;span class="glyphicon glyphicon-warning-sign" style="padding-right:5px; color:red;"&gt;&lt;/span&gt;&lt;a class="errors" style="color:red;"&gt;' . $errors . '&lt;/a&gt;&lt;br&gt;';
      }
  }
  else
  {
      header('Location: index.php');
      header('HTTP/1.1 200 OK');
  }
  </code></pre>
  
  <p><b>Request</b></p>
  
  <pre><code>posting.done(function(data){
      var errors = $('&lt;div&gt;' + data + '&lt;/div&gt;').find('.errors');
      if (errors.length &gt; 0)
      {
          $("#gb-errors").slideDown().empty().append(data);
      }
      else
      {
          $("#gb-errors").slideUp().empty();
      }
  });
  </code></pre>