irvy has asked for the wisdom of the Perl Monks concerning the following question:
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
and here is the perl script:<?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>
#!/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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: %ENV is returning a blank
by Anonymous Monk on Aug 18, 2011 at 21:54 UTC | |
by irvy (Initiate) on Aug 19, 2011 at 06:40 UTC | |
by Anonymous Monk on Aug 19, 2011 at 06:46 UTC | |
by irvy (Initiate) on Aug 19, 2011 at 07:22 UTC | |
by Anonymous Monk on Aug 19, 2011 at 07:36 UTC | |
| |
|
Re: %ENV is returning a blank
by Anonymous Monk on Aug 18, 2011 at 20:53 UTC |