Appending string using php to a text file
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>
Related posts:
- Append data to a text file using php
- Simple file upload script using php
- Displaying Text from User On Your Webpage
- How to get the query string value in perl cgi script
- Disable submit button on form submit
- Send Email to Multiple Persons using php
- Pass PHP Value To Javascript

Testing the form.