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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending data from 1 form to 2 or more perl script

Status
Not open for further replies.

Haazi2

Programmer
Aug 25, 2000
51
US
1. Can you send data from one form to 2 or more different perl scripts using 1 submit button?

2. I assume this can be done from an html page or a perl script that generates the html page, right?

3. How can I return the results of the 2 or more perl scripts on 1 html page?

4. Does anyone have an example of this, a book or tutorial that would explain how to do the above mentioned things?

Thanks for any help and/or suggestions offered.
 
I don't know how that can be done - I've never done it. One a POST or a GET, you give the ACTION, which I always thought must be *one* destination script, but maybe I'm wrong.
Hardy Merrill
Mission Critical Linux, Inc.
 
I think you MIGHT be able to submit to a perl script that just sends it to all of the other scripts. So you could "run" several scripts through that and send the information to them also. Here is the coding you would use as an example to run them and send them variables which you could modify to work with your current perl script.

$ENV{'REQUEST_METHOD'} = "GET";
$ENV{'QUERY_STRING'} = "id=$id2&file=$file&directory=$dir&url=$url&sport=$sport&editing=$edit&player=$playeroutput";
open(SCR,"$dir/templates/$directory/admin/$template.cgi|");

just modify the line with id=$id2&file=$file&directory=$dir&url=$url&sport=$sport&editing=$edit&player=$playeroutput to the variables you want to send. In other words you make variables from information sent from the form and then run those scripts that you are sending it to. The one that is final that you want to print like a thank you page or whatever you just add

while(<SCR>){
print;
}

that will print the output from running that script. Make sure you leave the | at the end of the script location so it will run it. If you have the ouput page print something like

content-type: text/html

at the top of the page just put the following line before the &quot;print;&quot; line

next if /content-type: text\/html/i;

I hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top