dominica1000 has asked for the wisdom of the Perl Monks concerning the following question:
Here is an example of the 2nd script - where the first script is posting to:#!/usr/local/bin/perl push (@INC, "\\foo\\cgi-bin\\hotjobs\\"); require "jobs_prefs.pl"; $jobdata="\\foo\\hotjobs\\data\\jobs.txt"; $sortfunction = sort_func; print "Content-type:text/html\n\n"; print "<html><head><title>TEST</title></head><body>"; print "<FORM ACTION=/cgi-bin/pmquestion2.pl method=post>"; open(DB2,,$jobdata); @indata = <DB2>; close(DB2); print "<P ALIGN=CENTER><IMG SRC=http://www.foo.com/images/stlogo.gif W +IDTH=220 HEIGHT=73><BR>"; print "<IMG SRC=http://www.foo.com/images/stdesign.gif WIDTH=220 HEIGH +T=47 ALT=artwork></P>"; print "<FONT FACE=Arial SIZE=2><P ALIGN=CENTER>Please click <a href=ht +tp://www.foo.com/hotjobs.html>here</a>". " to search our database of available jobs.</center><FONT FACE=Arial S +IZE=2> </P>"; print "<P ALIGN=CENTER><CENTER><TABLE BORDER CELLSPACING=1 BORDERCOLOR +=#000000 CELLPADDING=7 WIDTH=597>"; print "<TR><TD WIDTH=8% VALIGN=TOP BGCOLOR=#0000CD HEIGHT=17>"; print "<P><B><FONT FACE=Arial SIZE=2 COLOR=#ffffff>APPLY?</B></FONT></ +TD>"; print "<TD WIDTH=11% VALIGN=TOP BGCOLOR=#0000CD HEIGHT=17>"; print "<B><FONT FACE=Arial SIZE=2 COLOR=#ffffff><P>JOB #</B></FONT></T +D>"; print "<TD WIDTH=55% VALIGN=TOP BGCOLOR=#0000CD HEIGHT=17>"; print "<B><FONT FACE=Arial SIZE=2 COLOR=#ffffff><P>TITLE (Click to rea +d the description)</B></FONT></TD>"; print "<TD WIDTH=26% VALIGN=TOP BGCOLOR=#0000CD HEIGHT=17>"; print "<B><FONT FACE=Arial SIZE=2 COLOR=#ffffff><P>LOCATION</B></FONT> +<FONT FACE=Arial SIZE=2></TD></TR>\n"; @reverse = reverse(@indata); foreach $i (sort $sortfunction @reverse) { chop($i); ($Index,$Date,$Title,$Category,$JobCode,$Description,$Requirements,$Co +ntract,$field9,$field10,$field11,$field12,$City,$State,$field15) = sp +lit("\t",$i,15); print "<FONT FACE=Arial SIZE=2><tr>"; print "<FONT FACE=Arial SIZE=2><td><input type=checkbox name=JobID val +ue=$JobCode></td>"; print "<FONT FACE=Arial SIZE=2><td>$JobCode</td>"; print "<FONT FACE=Arial SIZE=2><td><a href=http://www.foo.com/cgi-bin/ +hotjobs/jobs_view.pl?index=$Index>$Title</a></td>"; print "<FONT FACE=Arial SIZE=2><td>$City, $State</td>"; print "</tr>\n"; } #print "($reverse[0]('Date'))"; #$record1 = ($Date($reverse[0])); #print "$record1 "; print "</table><p><center><input type=submit name=submit value=Apply F +or Jobs></form></center></font>"; print "</body></html>";
This isn't working! What am I doing wrong? Is there another way to do this besides what I am trying to do? Any help would be greatly appreciated.#!/usr/local/bin/perl use CGI qw(:standard); @jid = param('JobID'); print "Content-type: text/html\n\n"; print "<head><title>TEST SCRIPT</title>"; print "</head><font size=2 face=arial><p>"; foreach $jid (@jid) { print "+$jid"; } $ENV{'QUERY_STRING'} eq (print "+$jid"); #$ENV{'QUERY_STRING'} = print "+$jid"; } print "<p><a href=http://www.foo.com/cgi-bin/test2.pl?$ENV{'QUERY_STRI +NG'}>http://www.foo.com/cgi-bin/test2.pl?$ENV{'QUERY_STRING'}</a><p>" +; print "<p><a href=http://www.foo.com/cgi-bin/test2.pl?$ENV{'QUERY_STRI +NG'}>http://www.foo.com/cgi-bin/test2.pl?$ENV{'QUERY_STRING'}</a>"; print "</FORM><p></center></center></td></tr></table></BODY>";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to get into $ENV{'QUERY_STRING'}?
by httptech (Chaplain) on May 10, 2000 at 01:17 UTC | |
|
RE: How to get into $ENV{'QUERY_STRING'}?
by Adam (Vicar) on May 10, 2000 at 01:16 UTC | |
|
Re: How to get into $ENV{'QUERY_STRING'}?
by chromatic (Archbishop) on May 10, 2000 at 01:16 UTC | |
|
SECURITY RISK
by Anonymous Monk on May 10, 2000 at 02:32 UTC | |
by merlyn (Sage) on May 10, 2000 at 03:34 UTC |