Text File Updating

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
mjr
New php-forum User
New php-forum User
Posts: 18
Joined: Fri Sep 27, 2002 6:35 am
Contact:

Re: Text File Updating

Post by mjr » Fri Oct 25, 2002 9:58 am

use such command sequence:

<?php
$file = "summary.txt";
$fp = fopen("$file","w");
fputs($fp, $_POST["mytext"]);
fclose($fp);
?>



<? $stuff = implode("",file("summary.txt"));?>

<form method=post>
<textarea name="mytext" cols="50" rows="20">
<?php echo (htmlspecialchars($stuff)); ?>
</textarea>
<br>
<input type=submit>
</form>

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests