I have a simple online form, however when I fill it in using "get" it returns an empty QUERY_STRING. When I use the "post" method, it gives me CONTENT_LENGTH=0. I cannot figure out what I am doing wrong.

Here is the xml code

<?xml version="1.0" encoding="utf-8" ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Make a booking</title> <script src="makeBooking.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="makeBooking.css" +/> </head> <body> <form id="frmBook" action="/cgi-bin/makeBooking.pl" method="PO +ST"> <table id="tblBook" > <tbody id="tblBookBody"> <tr id="nameRow"> <td class="left">Name</td> <td class="right"> <input id="txtName" type="text" /> </td> </tr> <tr id="dateRow"> <td class="left">Date</td> <td class="right"> <input id="txtDate" type="text" /> </td> </tr> <tr id="durationRow"> <td>Duration</td> <td class="right"> <input id="txtDuration" type="text" /> </td> </tr> <tr id="venueRow"> <td>Venue</td> <td class="right"> <input id="txtVenue" type="text" /> </td> </tr> <tr id="otherInfoRow"> <td>Other Information</td> <td class="right"> <textarea id="otherInfoTxt" rows="5"></textare +a> </td> </tr> <tr> <td class="left"> <div><input type="submit" value="Submit" /></d +iv> </td> <td class="right"> <div> <input type="reset" value="Reset" /> </div></td> </tr> </tbody> </table> </form> </body> </html>
and here is the perl script:
#!/usr/bin/perl print "Content-type: text/html\n\n"; print "Query string=$ENV{'QUERY_STRING'}";

Simple code, I know, but I can proceed to better things once that simple test works

The output I get is

Query string=

I am not sure where the problem lies, however, I am confident the wise monks know and I look forward to your assistance.

Irvy

In reply to %ENV is returning a blank by irvy

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.