in reply to Get Form Data/Write to Text File

Try defining the path to the text file as absolute.

Also, you'll be saving yourself a heck of a lot of trouble if you use the Perl CGI module.