vorweg, habe die scuhfunktion benutzt, doch leider nicht richtig schlau daraus geworden
Habe folgenden code:
Fehlermeldung die kommt ist:
Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/g093/hdp/index.php:10) in /www/htdocs/g093/hdp/index.php on line 20
könnt ihr mir bitte einen Anschuppser geben, wo der Fehler liegt?
Danke im vorraus
Habe folgenden code:
PHP-Code:
<?php
$admin="admin";
$adminpw="admin";
$user="user";
$userpw="user";
?>
<html>
<head></head>
<body>
<form action="<?PHP echo $PHP_SELF ?>" method="post">
<input type="text" name="namefield">
<input type="text" name="pwfield">
<input type="submit" name="submit">
</form>
<?php
if ($namefield == $admin && $pwfield == $adminpw)
{
$ID=$admin;
header ('location:mitglieder_index.php');exit();
}
elseif ($namefield == $user && $pwfield == $userpw)
{
$ID1="$user . $userpw";
//header('location:mitglieder_index.php');
}
elseif ($namefield == "" && $pwfield == "")
{
echo "Noch keine Eingabe erfolgt";
//header('location:test.php');
}
else
{
echo " Passwort oder Benutzername falsch !";
}?>
</body>
</html>
Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/g093/hdp/index.php:10) in /www/htdocs/g093/hdp/index.php on line 20
könnt ihr mir bitte einen Anschuppser geben, wo der Fehler liegt?

Danke im vorraus
und habs ausprobiert, was aber leider auch nicht zum erfolg geführt hat
Kommentar