in reply to CGI Question: Getting and saving form parameters

What does the param function do here? Is it the param function from CGI.pm or is it defined somewhere in your code? If so, could you please include its code, the error may be there.

Replies are listed 'Best First'.
Re: Re: CGI Question: Getting and saving form parameters
by Hissingsid (Sexton) on Mar 18, 2004 at 17:09 UTC
    Hi,

    FWIW as a novice I'm doing something like this:

    use CGI; $qw =new CGI; my $text1 = $qw->param('text1'); my $text2 = $qw->param('text2'); #and on and on ####Insert validation so you don't put dangerous code into your file #stuff all of the text you want to print out into one variable and for +mat into nice Perl my $pageoutput = "\$text1 = \"$text1\"\; \$text2 = \"$text2\"\;1;"; open(INFO, ">>testing123.txt"); # Open for appending print INFO "$pageoutput"; close (INFO);
    Then you can just require this into another script.

    Hope this helps.

    Best wishes

    Sid