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

2 scripts to run

Status
Not open for further replies.

rhull

Programmer
May 23, 2001
46
US
The page is already using a cgi script now, I need to add
another script, is their a way to make 2 scipts run one after another? (w/ 1 submit button)

(ie <FORM ACTION=&quot;formemail.cgi,saveToDatabase.cgi&quot; METHOD=&quot;POST&quot;> yeah right:)

(I cant combine the 2 scripts into 1)
Thanks!
-R
 
You can call the second from the first....

In the first piece of CGI code, at the end of the code....
Code:
exec prog2.cgi;

From &quot;Programming Perl&quot; by Wall, Christiansen, & Schwartz,
&quot;This function (exec) terminates the currently running Perl script by executing another program in place of itself.&quot;

HTH If you are new to Tek-Tips, please use descriptive titles, check the FAQs,
and beware the evil typo.
 
hi,
i am sure you can combine the two scripts into one. by calling this code in teh first script
use progr2.cgi; (or require &quot;prog2.cgi&quot;;)

&and_call_the_function you want that exist in prog2.cgi

I've tried this and it works fine on me ( i have a membership program and use Yabb at the same time, after I have done with my script, i call

require &quot;location_to_yabb_module_i_want&quot;;
&register2;

and it works cheer
kevin
 
You can also call the program with the do command.

do &quot;program.cgi&quot;;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top