title: Help with Warning: Cannot modify header information - headers already sent by (output started at C:\## errors
body: <p>the db_connect file:</p>
  
  <pre><code>&lt;?php
  //connects to the database
      $username = "username";
      $password = "password";
      $hostname = "host";
      $database="database";
      $link=mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL".mysql_error());
      mysql_select_db($database, $link) or die("Could not select the database".mysql_error());
      ?&gt;
  </code></pre>
  
  <p>the process-login file:</p>
  
  <pre><code>&lt;?php session_start();
  include "DB_connect.php";
    if( !isset($_SESSION) )
    $username=$_POST["UserName"];
    $password=$_POST["Password"];
    $errormessage = "";
  
    $sql="SELECT * FROM members  where UserName='$username' and Password='$password'";
    $result = mysql_query($sql, $link)  or exit('$sql failed: '.mysql_error()); 
    $num_rows = mysql_num_rows($result);
    if($num_rows==0){header("Location:login.php");} 
    else {
      header("Location:MyPage.php");
      exit;
    }?&gt;
  </code></pre>
  
  <p>could you help to identify the errors?</p>