View Single Post
  #1 (permalink)  
Old 07-22-03, 07:15 PM
Industriality Industriality is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Question Append to a Text File

This should be very simple; here's my situation:

I have a list of names contained in a TXT file (names.txt). It's basically a sign-up list. There is one name per line. This is not an HTML file, so the line endings should not be <br> (I assume). So here is an example of what names.txt looks like:
Code:
Brian
Sarah
Steve
Jennifer
John
Amy
Dave
Now on my website I have a form that will be processed by append.php (this is the script I need your help to create). The form contains one text field named "First_Name" and a submit button. The form is named "My_Form" if that matters. Now, when someone types in their name and clicks Submit, append.php should take that name and append it to "names.txt".

Simple, right? So what code does append.php need to have to process the form in this way? I think the functionality of this is similar to a blog, in it's very simplest form.

Also, it needs to be functional with global variables turned off, if that matters. And the form can be processed via POST or GET, it doesn't matter to me.

Any help is appreciated.
Reply With Quote