neviem preco mi nefunguje \n
Kód:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<link href="styles.css" rel="stylesheet" type="text/css"/>
<title></title>
</head>
<body>
<center>
<form action="index.php" method="POST">
<fieldset>
<legend>Formatovanie do suboru</legend>
<input type="text" name="meno" size="15"> Vaše Meno<br>
<input type="text" name="priezvisko" size="15"> Vaše Priezvisko<br>
<textarea colums="15" rows="5" name="sprava">Správa</textarea><br>
<input type="submit" value="Formatni">
</fieldset>
</center>
<div id="vypis">
<?php
if (!File_Exists("formatnutie.txt"))
{
$fp = FOpen("formatnutie.txt","w");
FClose($fp);
}
if (isset($_POST["sprava"]))
{
$meno = $_POST["meno"];
$priezvisko = $_POST["priezvisko"];
$sprava = $_POST["sprava"];
$name = "<font class = meno>$meno $priezvisko</font><BR>\n";
$post = "<font class = sprava>$sprava</font><BR>\n";
$data = StripSlashes($name.$post);
$fp = FOpen("formatnutie.txt","w");
FWrite($fp, $data);
FClose($fp);
$fp = FOpen("formatnutie.txt","r");
FPassThru($fp);
FClose($fp);
}
?>
</div>
</body>
</html>
skript my sice vypise meno a spravu na stranke pod seba ale vo vystupnom subore ich mam pisane za sebou. a prave znak \n pridany do premennych by mal zarucit vypisanie do subora pod seba nie ?