This option will reset the home page of this site. Restoring any closed widgets or categories.

Reset

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>

 

VN:F [1.5.7_846]
Rating: 1.0/10 (1 vote cast)
VN:F [1.5.7_846]
Rating: 0 (from 0 votes)

Related posts:

  1. Append data to a text file using php
  2. Simple file upload script using php
  3. Displaying Text from User On Your Webpage
  4. How to get the query string value in perl cgi script
  5. Disable submit button on form submit
  6. Send Email to Multiple Persons using php
  7. Pass PHP Value To Javascript

1 Comment

  1. Testing the form.

    VA:F [1.5.7_846]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.5.7_846]
    Rating: 0 (from 0 votes)

Leave a Reply

Comments (required)

Spam Protected