php_beginner: Warning: Cannot modify header information - headers...

Beitrag lesen

Hi
Ich bekomme bei der Bearbeitung einer php Seite folgenden Fehler:

Warning: Cannot modify header information - headers already sent by //...path

Beim Googlen habe ich erfahren, dass, bevor ich eine header Deklaration mache, oder Cookies setze kein echo erfolgen darf.
Leider sehe ich kein echo vor diesen Ausfuehrungen, dennoch kommt der Fehler... Woran liegt das ?
Im html Teil sind noch weitere PHP Teile fuer die Vorbelegung der text values implementiert. Beim Auskommentieren aendert sich aber nichts, daher kann es daran nicht liegen.

//________________________________adminportal.php___________________
<?php
session_start();
?>

<?php
include('password.php');

$_SESSION['admin'] = false;

if (isset($_GET['send']))
{

if (isset($_GET['user']) && isset($_GET['pass']))
 {
  if (strcmp($_GET['user'],$admin_name)==0 && strcmp($_GET['pass'],$right_password)==0)
  {
   $_SESSION['admin'] = true;
   setcookie('LoginName',$_GET['user'], time()+ 60*60*24*7*4);
   setcookie('Password',$_GET['pass'], time()+ 60*60*24*7*4);
   header('Location: administration.php?' . urlencode(session_name()) . '=' . urlencode(session_id()));
  }
  else echo 'Incorrect Login Information.'.'<br>';
}
}

?>

<html>
<head>
<title>login</title>
</head>
<body>
<center>
<br><br><br><br><br><br><br><br><br><br><h1>Admin Login</h1>
<br><br>
<form action="adminportal.php" method="GET">
<table border=0>
<tr>
<td>User:</td>
<td><input type="text" name="user" value="<?php
if (isset($_COOKIE['LoginName']))
 echo htmlspecialchars($_COOKIE['LoginName']);
else
 echo '';
?>"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="pass" value="<?php
if (isset($_COOKIE['Password']))
 echo htmlspecialchars($_COOKIE['Password']);
else
 echo '';
?>"></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="send" value=Login></td>
</tr>
</table>
</form>
</center>
</body>
</html>