Midnite has asked for the wisdom of the Perl Monks concerning the following question:
So this is a 2 part question.
First, do I need to prepare my data in any way to get it to send correctly?
Second, How do I retreive it correctly, I am using the $ENV to do it, but it does't work.
Here is the form I create:
The File Name and Data line data is what I want, but I want to make them hidden, it is shown for testing purposes. Here is my second script:<TITLE>B.O.B. Question Submission</TITLE> <BODY BGCOLOR=\"#FFFFFF\"><font face=\"Arial\" size=\"3\"> <center><b><h2><font face=\"Comic Sans MS\">Check over data and if inc +orrect or in need of changes <br>Click on the BACK button <br>If correct, click on Send on the bottom of the page</font></H2></b +></center> <hr> <form action="bob_submitq.pl" method="POST"> Date: <b><i>$date</i></b> <br><hr> <p>This Question will possibly be for: <p><b><i>$round_data</i></b> <hr> <font face=arial size=8pt> <TABLE border=0 cellpadding=0> <tr> <td align=right size=8pt>Submitting Library:</td> <td align=left size=8pt> <b><i>$library</i></b></td> </tr> <tr> <td align=right>Submitting Initials:</td> <td align=left> <b><i>$initials</i></b></td> </TR> <tr> <td align=right>Category:</td> <td align=left> <b><i>$category</i></b></td> </TR> <tr> <td align=right>Type:</td> <td align=left> <b><i>$type</i></b></td> </tr> </TABLE> </font> <h3>$category Book and Author Info</h3> <p>$space20<b><i>$book_author</i></b> <h3>Question and Answers</h3> <p>$space20 Question: <b><i>$question</i></b> <p>$space20 $space20 Answer: $round_answer <p>$space20 Page Number: <b><i>$pagenum</i></b> <p>$space20 Changes: <b><i>$changes</i></b> <p>File Name: <b><i>$datefile</i></b> <p>Data Line: <b><i>$datajoin</i></b> <p>E-mail list: <b><i>$email_list</i></b> <p>$errorcat_desc<hr> <center><input type=submit value=Send name=S1> </center></form> </font></body></html>
#!/usr/bin/perl -wT # Created - by Joseph Ruffino 08/13/04 use CGI::Carp qw(fatalsToBrowser); # Errors are displayed in the web +browseer use CGI qw(:standard :html3); # For HTML output ###################################################################### +######### # Load in variables from form # my $datefile = $ENV{'datefile'}; my $datajoin = $ENV{'datajoin'}; #open (BOBIN, ">>$datefile") || die "Cannot Open File $datefile for wr +iting: $!"; #print BOBIN $datajoin; my $query = new CGI; print $query->header( "text/html" ); print <<END_WEB; <head><TITLE>Question Confirmation</TITLE></head> <BODY BGCOLOR=\"#FFFFFF\"> <center> <p>Data File: $datefile <p>Data Line: $datajoin <b><font face=\"Comic Sans MS\" size=\"5\"> <p>Your <p>Question and Answer <p>has been submitted to Youth <form action=http://www.gailborden.info/services/bob/rules.htm +l> <p>Click to <input type=submit value=Go name=go> back to Q +uestion Submiission Form </center></form> </center></font></body></html> END_WEB close(BOBIN);
janitored by ybiC: Balanced <readmore> tags around longish codeblock, to reduce scrolling in SoPW
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sending Data
by Joost (Canon) on Aug 12, 2004 at 17:26 UTC | |
by Midnite (Acolyte) on Aug 12, 2004 at 18:50 UTC | |
by mscerra (Monk) on Aug 12, 2004 at 20:46 UTC | |
|
Re: Sending Data
by bgreenlee (Friar) on Aug 12, 2004 at 17:51 UTC | |
by Mr_Jon (Monk) on Aug 12, 2004 at 21:08 UTC | |
by Midnite (Acolyte) on Aug 12, 2004 at 21:15 UTC | |
|
Re: Sending Data
by freddo411 (Chaplain) on Aug 12, 2004 at 18:08 UTC |