how to writw to the next line of a text file list
Posted: Sat Jul 10, 2004 11:31 pm
Hi,
I am really new to php. this is my first night learning php. I was hoping someone can tell me the proper code so that when I try to update my text file via a form, it goes to the next line everytime, instead of writing over the name I already have there. Here is my code:
Thanks,
Jason
feyd | Please use
I am really new to php. this is my first night learning php. I was hoping someone can tell me the proper code so that when I try to update my text file via a form, it goes to the next line everytime, instead of writing over the name I already have there. Here is my code:
Code: Select all
<?php
$filename = "uploads/test.txt";
$fp = fopen($filename, "w") or die("Couldn't open $filename");
$entry = $_POST[email];
fwrite($fp, $entry);
fclose($fp);
?>Jason
feyd | Please use
Code: Select all
tags when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]