Als ik op "post" klik krijg ik dit foutmelding, de reactie wordt wel gewoon geplaatst.
Warning: Cannot modify header information - headers already sent by (output started at /mounted-storage/home97a/sub002/sc61052-RTUT/voirea.nl/eliass/test/fwrite0.php:7) in /mounted-storage/home97a/sub002/sc61052-RTUT/voirea.nl/eliass/test/fwrite0.php on line 49Code:
<html>
<head>
<link rel="stylesheet" href='form.css' type="text/css" />
</head>
<body>
<font face="Verdana" color=#ff0000 size="2"><b>Reacties</b></font><br><br>
<?php
include("news.php");
?>
<br><br>
<font face="Verdana" color=#ff0000 size="2"><b>Reageer ook</b></font>
<?php
$date = date('d-m-y');
$time = date("g:i A");
$file = 'news.php';
$check_inhoud = file_get_contents($file);
if(empty($check_inhoud))
{
$inhoud = "<html><body></body></html>";
file_put_contents($file,$inhoud);
}
$temp_content = file_get_contents($file);
$temp_array = explode("<body>",$temp_content);
$tussenbody = explode("</body>",$temp_array[1]);
$tussenbody = $tussenbody[0];
if(!empty($_GET['area']))
{
$inhoud = "<html><body><FONT face=Verdana size=1># <a href=mailto://".$_GET['email']." target=_blank><b>".$_GET['naam']."</b></a> <small><font face=verdana size=1 color=#ff0000>$date @ $time (GMT)</font></small><br><font face=verdana size=1>".$_GET['area']." </font><br>-------------------------------------------------------------------<br>
<br>".$tussenbody."</font></body></html>";
$write = file_put_contents($file,$inhoud);
if($write)
{
header("Location: news.php");
}
else
{
echo "Error, posting news failed contact the webmaster.";
}
}
?>
<form name=editor method="GET" class="form">
<p><label>Naam</label><input type="text" name="naam"></p>
<p><label>Email</label><input type="text" name=email></p>
<p><label>Commentaar</label><textarea name="area" rows=6 cols=25 wrap=physical></textarea></p>
<p class="submit"><input type="submit" value="Post"></p>
</form>
</body>
</html>
Hoe krijg ik die foutmelding eruit?
knop om dit te doen.