Archivo
index_msg.php Código PHP:
<?
$lineas = file('msg.html');
foreach($lineas as $linea){
echo "$linea<br />";
}
?>
<form action="procesa.php" method="post">
<textarea name="msg" id="msg" rows="6" cols="30"></textarea>
<input type="submit" value="Enviar">
</form>
Archivo
procesa.php Código PHP:
<?
$msg = $_POST['msg'];
$f = fopen('msg.html',"a");
fputs($f , $msg."\r\n");
fclose($f);
header("Location: index_msg.php");
?>
Crea también un archivo llamado
msg.html con permisos
0777