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!

Calling a cgi program from another cgi program

Status
Not open for further replies.

dulux

Programmer
Sep 4, 2002
36
GB
Hi all,

Let me pose this one to you - it's probably really simple but I am a newbie so please bear with me -

Here is an example -

I have a cgi program that is used to generate the main page of my site. I wish to click on a link, which passes certain information to another cgi program, which will perform some function and then pass the result back to the calling cgi program.

How is this done? Are there any shortcuts to make this easier?

Thanks

Dulux

 
Dulux,

Once your first cgi script has generated the page to be displayed in the browser it finishes and the connection closes. Your link in the web page would just need to pass the necessary parameters to the second cgi and that script would generate the next web page to be displayed based on the parameters that it received. The first cgi script would not be involved. You may recall the first cgi script passing it new parameters with a link on the web page it orginally created and have it generate a new page with the new parameters.

Derek
 
Thanks for the prompt answer.

I was thinking of the CGI program as running in the same way as with any app I have ever written - i.e. running until it is told to stop...

I'm beginning to see the light at the end of the tunnel now - it is the browser that does all the storing of passed variables - whether hidden or not, and then passes them on to whatever is called next. Just typing it out helps me get a better handle on the whole issue.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top