Hi All, I was wondering if any of you know why my CGI.pm is only retrieving GET values and not values from POST.

use strict; use warnings; use CGI; my $cgi = CGI->new; my $opt = $cgi->param('action'); print $cgi->header; print $opt; print "wtf";

I put the above code inside a file called main.pl. My form:

<form action="main.pl" method="POST"/> <input type="hidden" name="action" value="PLEASE" /> <input type="submit" name="submit" value="Submit" /> </form>

So when accessing the form and submitting, it only prints "wtf". When going directly to main.pl?action=PLEASE, it will display, "wtfPPLEASE". I have the latest CGI 3.62 installed and verified on ActiveState PPM. This is on IIS on Win11SBS. The Perl installation and configuration seems to be smooth. I added the correct Handler Mapping, etc. It's also a 64 bit, but I have the 32bit enable option to true. I did a simple "Hello World" script to test after installing and configuring Perl on IIS 7. Anyone have any ideas why the POST method does not work? It's driving me insane...will appreciate any suggestions or ideas. THANK YOU!!!!!~!


In reply to CGI.pm POST method does not work by Anonymous Monk

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.