I had the same problem last week and solved it this way:

You check the QUERY_STRING_UNESCAPED environment variable. It will contain the parameter list that is provided to the page, as opposed to the parameter list that is sent with your SSI.

You then take away the backslashes in QUERY_STRING_UNESCAPED and force-feed it to CGI.pm (if you are using CGI.pm, that is). You may also want to check that your dealing with the same ID in the query strings, in case if you (like me) want to have several embedded cgi scripts as SSIs in one page. ID is "poll_id" in the code below:

unless ($ENV{"REQUEST_METHOD"} eq "POST") { my $url_query_string = $ENV{'QUERY_STRING_UNESCAPED'}; $url_query_string =~ s§\\§§g; $url_query_string =~ m§poll_id\=([\d_]+)§; my $poll_id = $1; $ENV{'QUERY_STRING'}=~ m§poll_id\=([\d_]+)§; my $ssi_poll_id = $1; # if there is a dicrepancy between the two query string vars, +and # there is actually something in # ENV{'QUERY_STRING_UNESCAPED'}, it's because the cgi is calle +d as an SSI, # but with arguments on the url, # and then we want CGI to use those instead # "not $cgi_parameters" below handles if we get params from a +test harness script if ($url_query_string and $url_query_string ne $ENV{'QUERY_STR +ING'} and not $cgi_parameters and $poll_id eq $ssi_poll_id) { $cgi_parameters = $url_query_string; } } my $q = new CGI($cgi_parameters);

/jeorgen


In reply to Re: SSI losing CGI parameters by jeorgen
in thread SSI losing CGI parameters by fred

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.