getting posted results

if i use the method post to send data to
a script then how (in the script that i posted
the data to) do i print out the information
ie what variable does the posted data get asigned to?
Who is Participating?
KennyConnect With a Mentor IT Application ExecutiveCommented:
This code will do the job :


# To handle input from forms / URL

#Putting the Query_string into a variable
      if ($ENV{'REQUEST_METHOD'} eq POST)
            read (STDIN, $QueryString, $DataLength);
            $QueryString = $ENV{'QUERY_STRING'};

#Splitting the pairs and putting them in a list
      @NameValuePairs = split (/&/, $QueryString);

#Preparing for HTML stuff

      print "Content-type: text/html","\n\n";      # MIME header

      print "<HTML>","\n";
      print "<HEAD>","\n";
      print "<TITLE>","Parameters sent in","</TITLE>","\n";
      print "</HEAD>","\n\n";
      print "<BODY>","\n\n";
#Separating the pairs and displaying them on screen.

      $n = 0;
      foreach $NameValue (@NameValuePairs)
            ($Name, $Value) = split (/=/, $NameValue);
            $Value =~ tr/+/ /;
            $Value =~ s/%([\dA-Fa-f][\dA-Fa-f])/ pack ("C", hex ($1))/eg;

            print "Variable=$Name, Value=$Value <BR>\n";

      print "</BODY>","\n\n";
      print "</HTML>","\n\n";
boofullsAuthor Commented:
All Courses

From novice to tech pro — start learning today.