A very easy way to append string to a file using simple php script <?php $fn = “file.txt”; $file = fopen($fn, “a+”); $space.= “\n”; if($_POST['addition']) fwrite($file, $_POST['addition']); fwrite ($file, $space); fclose($file); ?> <form action=”<?=$PHP_SELF?>” method=”post”> <input type=”text” name=”addition”/><br/> <input type=”submit”/> </form>
You will also be interested in ,
- JAVA Simple Tutorial Part-I
- Simple file upload script using php
- Javascript setTimeout() Tricks
- Simple PHP Login Script
- Arrays In PHP
- Simple Javascript Slideshow
- Caching of images using javascript image object
- How to create random passwords using php
- Get IP address using gethostbyname() function
- Hit counter using php

Testing the form.