Discussion Locked

CGI Forms...txt file

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm new to CGI programming, so this may be a stupid question but here
goes....

Is it possible to have a form submit its data via a textfile (.txt) rather
than through an email?

If so could you point me in the right direction?

Thanks

Steven

2 replies

by law

Basically, where would you be sending the text file. I think that is the basic part to getting to the correct answer, I too and getting started with CGI and thst question is interest, but you may already ahve the answer, reread what CGI does and approach it with your queston in mind. good look, and let me know what you find out if you dont mind.
Thanks

by jk117

Using CGI it is very easy to write form data to a text file. I use Perl, the code would be:

open (FILEHANDLE , ">>$filename");
#write date to file
print FILEHANDLE "$data";
close (FILEHANDLE);

I would recommend picking up a Perl book.The server that hosts your site must have CGI and Perl modules installed.

This discussion is closed to new replies.