potreboval by som poradit
mam vytvoreny jednoduchy zapis z text area do suboru:
Kód: Vybrať všetko
<?php //test.php
if(isset($_POST['add'])){
$area=$_REQUEST['area'];
$fs=fopen("test.txt","a");
$space = "\n";
fwrite($fd,$space);
fwrite($fd,$area);
fclose($fd);
$file_contents=file_get_contents("test.txt");
print $file_contents;
}
?>
<html>
<body>
<form method="post" action="test.php">
Enter something: <textarea cols=40 rows=10 name="area"></textarea><br>
<input type="submit" name="add" value="add">
</form>
</body>
</html>
Kód: Vybrať všetko
$fs=fopen("test.txt","a");len momentalne by som tam chcel pridat dalsie tlacidlo, ktore vykona to ze zadani tex sa tam neprida k stavajucemu ale stare sa vymaze a zostane tam len tento novy text.