I'm trying to write a simple little PHP script that takes in an e-mail address the user types into a text field and put it at the end of a text file called 'mailinglist.txt' This file contains a list of all the e-mail addresses signed up for the list.
However, using fopen( $thefilepath, "a" ) (for appending text to the end of a file) doesn't work. I need to access the file through FTP (i.e., $thefilepath is like 'ftp://user

ass@ftp.server.com/list.txt' ) , and that may be the problem - but reading the file into a variable, appending the address to that, and then writing over the file doesn't work, either. Anyone have any ideas/suggestions?
(actually, typing that made me realize that in the script I don't rewind the file pointer when I try to overwrite the file with the variable - but I wouldn't think that's the problem. Oh, and MySQL database isn't an option.)