PHP header("Location:bla") already exists : <p>I have a question. When I want to log in to my website, I get a really weird error, "Warning: Cannot modify header information - headers already sent by (output started at script:29) in script on line 44"</p>

<pre><code>&lt;?php
$verhalten = 0;
include("connect.php");

if(!isset($_SESSION["email"]) and !isset($_GET["page"]))  {
$verhalten = 0;
}
if (isset($_GET["page"]) &amp;&amp; ($_GET["page"]) == "log") {

$user = $_POST["user"];
$passwort = md5($_POST["passwort"]);
}
?&gt;


if($email == $row-&gt;Email &amp;&amp; $pass_hash == $row-&gt;Passwort)
    {

        header("Location: such_form_kunden.php?ID=$row-&gt;Kundennr");
        $_SESSION["email"] = $email;
        $verhalten = 1;
        exit;
    }
</code></pre>
