title: XAMPP Server Error (Error 500)
body: <blockquote>
    <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
    If you think this is a server error, please contact the webmaster.
    Error 500
    localhost
    Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30</p>
  </blockquote>
  
  <p>I opened the log error and found out that the issue is about the header() i have in my user.inc.php:</p>
  
  <pre><code>function getLogin($conn){
  if(isset($_POST['login']))
  {
      $uid=$_POST['uid'];
      $pwd=$_POST['pwd'];
  
      $sql= "SELECT * FROM user WHERE uid='$uid' AND pwd ='$pwd'";
      $result=$conn-&gt;query($sql);
      if (mysqli_num_rows($result) == 1){
          if($row = $result-&gt;fetch_assoc()){
  
                  $_SESSION['id'] = $row['id'];
                  header("Location : index.php?loginsuccess");
                  exit();
          }
      }
      else{
  
  
  
      }
  }
  }
  </code></pre>
  
  <p>The error log :</p>
  
  <blockquote>
    <p>[Tue Jul 25 10:26:58.464402 2017] [http:error] [pid 2380:tid 1656] [client ::1:49602] AH02429: Response header name 'Location ' contains invalid characters, aborting request, referer: <a href="http://localhost/tgss/index.php" rel="noreferrer">http://localhost/tgss/index.php</a></p>
  </blockquote>
  
  <p>Please, help.</p>