in reply to Storing multi-line form data in a flat file?
This code assumes that A. you want to append the data to a growing file with each submission, and B. you only want the data from a single form field called "text_box".use CGI qw(:cgi); use strict; my $flatfile = "somefile.txt"; my $query = CGI->new(); my $text = $query->param("text_box"); open(FLATFILE, ">>somefile.txt") or die "Open failed, $!"; print FLATFILE "$text\n\n"; close(FLATFILE); print "Content-type: text/html\n\n"; print "Success!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Storing multi-line form data in a flat file?
by SilverB1rd (Scribe) on Mar 15, 2001 at 02:15 UTC | |
by Hot Pastrami (Monk) on Mar 15, 2001 at 02:20 UTC |