Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script.pl?action=display&form=officers

Status
Not open for further replies.

Moooink

Technical User
Feb 22, 2002
48
US
when trying to call the script via the browser, the script doesn't seem to work. It's on Apache on nt with perl 5, and the script works and has been tested on another server. All parts of the script works except the display sub which called via
if ($INFO{'action'} eq "display") {&display;}
and script.pl?action=display&form=officers

what's wrong? is there something in the perl or apache not set right? help.
 
My question for you is: Does the script run at all, or does it return an error. From what I pick up (through my ESP ;) ) is that it works, but you not getting your desired result.

Here's what you should do. Above the if($INFO{'action'}...
statement, put a:

Code:
print "Does $INFO{'action'} really equal 'display'\n";
Then, change the insides of the block from
Code:
&display;

to

Code:
print "it worked"; &display;
By doing putting these "helpers" in your script, we'll be able to determine where the problem lies. Also, is the script being called from a "form" or a link? If it's being called from a form make sure that you aren't saying:
Code:
<form action=&quot;script.pl?action=display&form=officers&quot;>
becuase this WILL NOT WORK.
If using a form, include parameters like this as &quot;hidden&quot; input. I ran into this problem a while ago and it had me stumped for a while.

OK, see what happens!

--Jim
 
well i know the script works, because it's on another server right now, and it works perfectly. $FORM is for submitting information to the script for subroutines, (a hidden field)...and $INFO is for submitting information to the script from the browser via script.pl?action=blahh&display=blahh...for the subroutines. if you want proof that it works, shows it working perfectly,...i removed the script from the previous site, so no use trying...but i would still like to understand why this problem is coming up if possible, thanks
 
You should try what coderifous said and use a print statement to make sure that the variable is receiving the form information. Also dont forget to print the http header i.e. print &quot;content-type: text/html\n\n&quot; or the windows equivalent. If it is receiving the form information then its a problem with your sub &display.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top