Solo te lo muestre como texto y no cambia la pag..
este es mi codigo :
Código PHP:
<?
$file = "miguestbook.txt";
if (isset($_POST['comment']) && $_POST['name'] != "" && $_POST['email'] != "") {
$nombre = $_POST['name'];
$email = $_POST['email'];
$comment = $_POST['comment'];
$fp = fopen($file,"r+");
$lectura = fread($fp,filesize($file));
$email = "<a href='maito:$nombre'>$email</a>";
$fecha = date("j:n:Y");
$todo = "<p></b>$nombre</b> ($email) <i>$fecha</i>: <br>$comment</p>\n";
$comment = htmlspecialchars($comment);
$comment = stripslashes($comment);
$comment = nl2br($coment);
rewind($fp);
fputs($fp,"$todo \n $lectura");
fclose($fp);
}
else {
if (isset($_POST['mibtn']))
{
echo "Debes completar todos los campos";
}
}
?>
<div align='center' style="margin:90px;padding:10px;border:1px dotted red">
<?
readfile($file);
?>