title: Passing variables from PHP to Perl using POST
body: <p>This one is a tad frustrating.</p>
  
  <p>If I run this perl script ...</p>
  
  <pre><code>#!/usr/bin/perl
  
  use CGI qw/:standard/;              # load standard CGI routines
  my $query = new CGI;
  
  my $club5   = $query-&gt;param('club5');
  my $messagetext = $query-&gt;param('messagetext');
  
  print header,                       # create HTTP header
      start_html('Hello World'),      # start of HTML
      h1('Hello World'),              # level 1 headers
      h1($club5),
      h1($messagetext),
      end_html;                       # end of HTML
  
  1;
  </code></pre>
  
  <p>from a remote Chrome browser with</p>
  
  <pre><code>http://www.&lt;hostname&gt;/cgi-bin/message_test.pl?club5=coop9&amp;messagetext=test
  </code></pre>
  
  <p>the correct page is produced. But if I then execute this PHP program ...</p>
  
  <pre><code>&lt;?php
  
  $user_id = "10006";
  
  echo &lt;&lt;&lt;END
  &lt;html&gt;
  &lt;head&gt;
  
  &lt;title&gt;Send Message&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;BODY bgcolor="#e8e8e8"&gt;
  &lt;br&gt;
  &lt;table width="450px" height="150px" align="center" valign="top" bgcolor="#e8e8e8"&gt;
  
  &lt;form action="http://&lt;hostname&gt;/cgi-bin/message_test.pl" method="post"&gt;
  
  &lt;INPUT TYPE="hidden" NAME="user_id" VALUE="$user_id"&gt;
  
  &lt;tr align="center" valign="top"&gt;
  &lt;td&gt;
  &lt;br&gt;
  &lt;font face="Verdana" size="2"&gt;
  
  &lt;input name="messagetext" type="text" size="64"&gt;
  &lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;&lt;center&gt;
  &lt;input name="submit" type="submit" value="SEND"&gt;
  &lt;/font&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;/form&gt;
  
  &lt;/table&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  END;
  
  ?&gt;
  </code></pre>
  
  <p>from the same browser with</p>
  
  <pre><code>http://&lt;hostname&gt;/message_test.php
  </code></pre>
  
  <p>nothing is returned. I swear I had something similar this running a year ago. Is there something new I should be aware of when passing (hidden) variables to Perl using HTTP POST?          </p>