Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
here is the code for the save:<form name="mainform" action="webapp.cgi?rm=mode9" method="post"> <textarea name="text_field" cols="60" rows="20"><TMPL_INCLUDE NAME="me +nu.tmpl"></textarea> <br> <button type="submit">Update</button> <button t +ype="reset">Reset Form</button> </form>
I know my cgi-app is working because I can navigate to other pages in different run modes. Please help! I see wisdom! Bobsub save_form { my $self = shift; # Get CGI query object my $q = $self->query(); my $record = $q->param( 'text_field' ); open( FH, '>output.txt' ) || die "Can't open output.txt: $!"; print FH $record; close ( FH ); # go back to the beginning return $self->run_mode( 'mode1' ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to write to a file using CGI
by chromatic (Archbishop) on Jun 29, 2003 at 22:54 UTC | |
|
Re: How to write to a file using CGI
by Zaxo (Archbishop) on Jun 30, 2003 at 00:56 UTC | |
|
Re: How to write to a file using CGI
by fglock (Vicar) on Jun 29, 2003 at 21:57 UTC |