Hi Monk,
I have a cgi perl script in which I have the following HTML form data embedded. Please let me know how can I retrieve the "StatusFilterSelect" value through cgi object

<form name="frmStatusFilter" method="GET" action="http://webserver.com +:8010/cgi-bin/mycgi.pl"> Choose Filter:<select name="StatusFilterSelect" onChange="frmStatusFil +ter.submit()"> <option>Show with status</option> <option>Show all</option> </select> </form>

I am trying with the following, but not working Please help. Thanks in advance.

my $q = new CGI; my $status = $q->param('StatusFilterSelect'); $q->html("status is $status"); ## not showing any value

$status is not showing anything. Please assume I am not making any syntax error. Is this how to extract the value in chi perl. Is my approach right?


In reply to How to extract a form data in cgi perl by ghosh123

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.