Ik ben al ongeveer een half uur bezig met het uitzoeken waarom deze fout blijft komen. Ziet iemand het sneller?

De fout is:

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/test/index.php:10) in /var/www/html/test/index.php on line 84

<?php
session_start();
include("connect.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">;
<head>
<title>"De Lauwer" - Stafsite</title>
<style type="text/css" media="all">
@import "css/raised.css";
</style>
<link rel="alternate stylesheet" type="text/css" media="all" title="no2" href="css/kielboot.css" />
<link rel="alternate stylesheet" type="text/css" media="all" title="no3" href="css/zwaardboot.css" />
<link rel="alternate stylesheet" type="text/css" media="all" title="no4" href="css/surf.css" />
<link rel="alternate stylesheet" type="text/css" media="all" title="no5" href="css/barenkeuken.css" />
<link rel="alternate stylesheet" type="text/css" media="all" title="no6" href="css/directie.css" />
<link rel="alternate stylesheet" type="text/css" media="all" title="no7" href="css/begeleiders.css" />
<script type="text/javascript" src="raised.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="false" />
</head>
<body onload="window.defaultStatus='stafsite.nl'">
<div id="skipnav"><a href="#mainhead" title="skip navigation" tabindex="1" accesskey="u">Skip Navigation</a></div>
<div id="wrapper">
<div id="header"><!--logo in background--></div>

<!--content container-->
<div id="content">
<div id="menu">
<center><table border="0" width="680">
<tr>
<td bordercolor="#FFFFFF"><a href="login.php" tabindex="1" title="Home" target="_parent">Home</a></td><td bordercolor="#FFFFFF"><img src="images/streep.gif"></td>
<td bordercolor="#FFFFFF"><a href="fotoalbum.php" tabindex="2" title="Foto's" target="_parent">Foto's</a></td><td bordercolor="#FFFFFF"><img src="images/streep.gif"></td>
<td bordercolor="#FFFFFF"><a href="wist.php?start=0&eind=15" tabindex="3" title="Wist je dat?" target="_parent">Wist je dat?</a></td><td bordercolor="#FFFFFF"><img src="images/streep.gif"></td>
<td bordercolor="#FFFFFF"><a href="agenda.php" tabindex="4" title="Agenda" target="_parent">Agenda</a></td><td bordercolor="#FFFFFF"><img src="images/streep.gif"></td>
<td bordercolor="#FFFFFF"><a href="aantekeningen.php" tabindex="5" title="Aantekeningen" target="_parent">Download</a></td><td bordercolor="#FFFFFF"><img src="images/streep.gif"></td>
<td bordercolor="#FFFFFF"><a href="phorum/list.php?f=1" tabindex="6" title="Forum" target="_parent">Forum</a></td><td bordercolor="#FFFFFF"><img src="images/streep.gif"></td>
<td bordercolor="#FFFFFF"><a href="profiel.php" tabindex="7" title="Mijn profiel" target="_parent">Mijn Profiel</a></td><td bordercolor="#FFFFFF"><img src="images/streep.gif"></td>
<td bordercolor="#FFFFFF"><a href="profielen.php" tabindex="8" title="Profielen" target="_parent">Profielen</a></td><td bordercolor="#FFFFFF"><img src="images/streep.gif"></td>
<td bordercolor="#FFFFFF"><a href="links.php" tabindex="9" title="Links" target="_parent">Links</a></td>
</tr></table></center></div><br>
<!--Begin Navigation Container-->
<table><tr><td></td><td><p class="titel"> Stafsite</p></td></tr>
<tr><td width="150"><center>Maak jouw keuze uit de verschillende styles:</center>
<ul>
<!--Begin Style Links-->
<div id="nav"><center><ul>
<li class="navtop"><a href="#" tabindex="2" onclick="setActiveStyleSheet('default'); return false;" onkeypress="setActiveStyleSheet('default'); return false;" title="default">Standaard</a></li>
<li><a href="#" tabindex="3" onclick="setActiveStyleSheet('no2'); return false;" onkeypress="setActiveStyleSheet('no2'); return false;" title="kielboot">Kielbootboot</a></li>
<li><a href="#" tabindex="4" onclick="setActiveStyleSheet('no3'); return false;" onkeypress="setActiveStyleSheet('no3'); return false;" title="zwaardboot">Zwaardboot</a></li>
<li><a href="#" tabindex="5" onclick="setActiveStyleSheet('no4'); return false;" onkeypress="setActiveStyleSheet('no4'); return false;" title="surf">Surf</a></li>
<li><a href="#" tabindex="6" onclick="setActiveStyleSheet('no5'); return false;" onkeypress="setActiveStyleSheet('no5'); return false;" title="barenkeuken">Bar en Keuken</a></li>
<li><a href="#" tabindex="7" onclick="setActiveStyleSheet('no6'); return false;" onkeypress="setActiveStyleSheet('no6'); return false;" title="begeleiders">Begeleiders</a></li>
<li><a href="#" tabindex="8" onclick="setActiveStyleSheet('no7'); return false;" onkeypress="setActiveStyleSheet('no7'); return false;" title="directie">Directie</a></li>
<!--End Style Links-->
</ul><br><b>Google Ads???</b></center>
</div></td>

<td width="720">
<?php
if(isset($_POST['login'])){
if($_POST['naam'] == 'staflid' && $_POST['wacht'] == 'lauwtje'){
echo "<form action=register.php method=post>";
echo "<table><tr><td><input type=submit name=logreg value='Ik wil me registreren'></td></tr></table></form>";
}
else {
if($_POST['naam'] == 'admin' && $_POST['wacht'] == 'turkije'){
$_SESSION['admin'] = 1;
$_SESSION['loggedin'] = 1;
echo "Je bent als admin ingelogd...";
}
else {
if($_POST['wacht'] == ''){
echo "De ingevoerde logingegevens waren niet juist. Ga terug. De algemene login is veranderd. Voor het nieuwe wachtwoord moet je mij mailen, [email protected]";
}
else {
$select = "select id, wacht from login2 where naam = '" . $_POST['naam'] . "'";
$query = mysql_query($select);
$result = mysql_fetch_assoc($query);
if($_POST['wacht'] == $result['wacht']){
$_SESSION['loggedin'] = 1;
$_SESSION['loginid'] = $result['id'];
header("location: http://www.stafsite.nl/test/nieuws.php";);
}
else {
echo "De ingevoerde logingegevens waren niet juist. Ga terug. De algemene login is veranderd. Voor het nieuwe wachtwoord moet je mij mailen, [email protected]";
}
}
}
}
}
else {
echo "<p>Welkom op de stafsite. Waarom de stafsite?<br><br>

1) Hier staat alle belangrijke informatie of trainigsdata<br>
2) Dit is de plaats om je in te schrijven voor trainingen<br>
3) Er is een gezellig forum met informatieve topics en gezellige topics<br>
4) Je vind alle informatie van diverse stafleden

<br><br>
In een email die je hebt gekregen staat hoe je in moet loggen. Heb je deze email niet gekregen, mail dan naar Teun of René:
<a href=mailto:[email protected]>[email protected]</a> of naar <a href=mailto:[email protected]> [email protected]</a>.</p>";
echo "<form method=post action=index.php>";
if(isset($_SESSION['loggedin'])){
echo "Je bent al ingelogd";
}
else {
echo "<table>";
echo "<tr><td>Loginnaam:</td><td><input type=text name=naam></td></tr>";
echo "<tr><td>Wachtwoord:</td><td><input type=password name=wacht></td></tr>";
echo "<tr><td><input type=submit name=login value=Login></td><td>&nbsp;</td></tr>";
echo "</table>";
echo "</form>";
}
}
?>

</td></tr></table>

</div>
<div id="footer">
<p style="MARGIN: 0cm 0cm 0pt"><center>Heb je vragen over de stafsite mail dan naar <a href="mailto:[email protected]">[email protected]</a></center></p>
</div>
</body>
</html>
Als je dat ook nog even een half uur besteed aan zoeken op dit forum, dan zie je dat die vraag al heel vaak gesteld is... Meeste antwoord is: Leer engels, en kijk naar de error...
heb al gezocht op het forum en ook algemeen iets over deze foutmelding, maar dat helpt me nog nix verder

ik snap wel dat die header helemaal omhoog moet, maar dat kan volgens mij niet omdat hij op die plek voor de layout moet komen. Dus hoe kan ik dat dan oplossen. Dat zie ik nergesns
Dan zoek je niet goed genoeg, er zijn andere manier om een pagina door te sturen en je kan je pagina zo opbouwen dat je toch die header kan gebruiken, door alles in een var te zetten, en die aan het eind te outputten...
ob_start() en ob_flush, zegt je misschien niets, maar zoek daar maar eens op op php.net

Reageren