file_put_contents('plik.txt', $_POST['nazwa_pola_z_formularza_ktorej_wartosc_ma_sie_znalesc_w_pliku']);
<form method="post" action=""> <input type="text" name="content" /> <input type="submit" name="submit" /> </form> <?php file_put_contents('plik.txt', $_POST['content']); } } ?>