http://qs1969.pair.com?node_id=58514


in reply to Re: Second hack at Secure Mailer
in thread Second hack at Secure Mailer

Thanks for the help, I would really like to see how you would write it.

The reson I did not use the header option in the cgi.pm is that it did not work it kept giving me a script error on the server. I use the CGI.pm to process the form data.

I can not have a static list of templates such as default extra, because this script would be used on a number of different forms.

Like I said before I'm only trying to making this script work the way the first script worked.

Replies are listed 'Best First'.
Re: Re: Re: Second hack at Secure Mailer
by $code or die (Deacon) on Feb 15, 2001 at 04:39 UTC
    Ok, this problem is that if you POST and have a query string, by default CGI.pm will only put the form values that are "POSTed" into the param() function, and ignore the query string.

    There is a hack provided by the author that will allow it to process both the query string and the POSTed values together. You can check the CGI docs for more info, but basically search for "cake and eat it" in the CGI.pm file and uncomment the next line of code.

    $code or die
    Using perl at
    The Spiders Web
Re: Re: Re: Second hack at Secure Mailer
by MeowChow (Vicar) on Feb 15, 2001 at 05:20 UTC
    Are you doing:
    print $query->header;
    or
    print header;
    If the latter, you will need to change your use CGI into:
    use CGI qw(:standard);
    Or something of that sort, as CGI is not exporting any functions by default.
       MeowChow                                   
                   s aamecha.s a..a\u$&owag.print
      I'm was using print $query->header;

      I dont have access to the perl files on my web server. Second I dont think it would pull the information off the commmand line like I need it to. The command line would look like this "/myfolder/mytemplate.txt".