Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

This should be pretty simple, but I can't figure out how to do it. I have a form with some form fields. What it is is a contract and where I needs info from the user, there's a text field or a drop down. When the user submits the form, I don't want it e-mailed, I just want a results page to come up with what they've entered in the fields which are in certain parts of the contract.

See http://www.walstonet.com/contract.php and http://www.walstonet.com/contract_results.php

Can anyone tell me what I need to do for this to work based on the two examples above?

Thanks so much!

Replies are listed 'Best First'.
Re: Printing form results
by tachyon (Chancellor) on Apr 12, 2003 at 22:12 UTC

    Can anyone tell me what I need to do for this to work based on the two examples above?

    Learn some Perl perhaps? Link is to PHP which is a different language.

    Have a look a Ovids tutorial Web Programming With Perl for a quick start. This snippet will dump all the form fields for you to the browser, in param tab value format.

    #!/usr/bin/perl -w use strict; use CGI; my $q = new CGI; print $q->header(); print '<pre>'; print "$_\t" . $q->escapeHTML($q->param($_)) . "\n" for $q->param(); print '</pre>';

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Re: Printing form results
by Your Mother (Archbishop) on Apr 13, 2003 at 00:02 UTC
    And this is probably really a javascript question (send the window to the local printer if supported -- "window.print()" and its cousins may or may not work) which is unreliable for printing. For something legal like a contract this should never be counted on. Just email the results or generate a PDF on the server side for download. Do not expect anyone else's browser to act like yours does.