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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Help on param ()
by shmem (Chancellor) on Sep 12, 2006 at 09:13 UTC

    Is this about CGI? Have you read How do I post a question effectively? If not, do so.

    If you have a form element like

    <input name="article">

    and you type "chickensoup" into the field and submit to a CGI script containing

    my $input = 'article'; my $product = $query->param($input);

    the variable $product should hold the string "chickensoup". Doesn't? Post some code. Read CGI.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re: Help on param ()
by Nevtlathiel (Friar) on Sep 12, 2006 at 11:24 UTC
    You should probably also read up on taint mode. In addition, Ovid has a very good introduction to CGI that covers all the basics (including taint mode). You should definitely give it a look.

    ----------
    "Write a wise saying and your name will live forever." - Anonymous

Re: Help on param ()
by svenXY (Deacon) on Sep 12, 2006 at 07:07 UTC
    Hi,
    again, you did not provide any sample code. This makes it extremely difficult to guess what you actually want or what your problem is.
    Furthermore, you leave all the work of creating some sample code to explain something to us.
    Regarding your question: I can only guess that you did not properly name your form elements.
    $product=param($product);
    works if there is a form element with a name property of $product and the submit button has been clicked.
    If you give us an example, we can look at the code and tell you more.
    Regards,
    svenXY
Re: Help on param ()
by jdtoronto (Prior) on Sep 12, 2006 at 07:22 UTC
    If the name of the form field is 'propertyproduct' then you would use:
    $product = param('product');
    but you MUST name the fields.

    jdtoronto Updated Corrected incorrect element name in para1. Thanks nevtlathiel & Hue-Bond