if($_POST['Submit']){
$open = fopen("overzicht.txt","w+");
$text = $_POST['update'];
fwrite($open, $text);
fclose($open);
echo "<b>Bestand 'overzicht.txt' is opgeslagen</b><br /><br />";
echo "<i>Inhoud:</i><br />";
$file = file("nieuwsoverzicht.txt");
foreach($file as $text) {
echo $text."<br />";
}
}else{
$file = file("overzicht.txt");
echo "<form action=\"".$PHP_SELF."\" method=\"post\">";
echo "<textarea Name=\"update\" cols=\"50\" rows=\"40\">";
foreach($file as $text) {
echo $text;
}
echo "</textarea>";
echo "<input name=\"Submit\" type=\"submit\" value=\"BEWAAR\" />\n
</form>";
}
Ik heb zitten fröbelen met autoScroll: true in de textarea, maar dat werkt dus niet. Is er iemand dit dit doorheeft?
Graag!