Forum Moderators: coopster & phranque

Message Too Old, No Replies

Delivering info to 2 cgi scripts

can this be done

         

stcrim

3:52 am on Nov 22, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is it possible with one click of a button to deliver data to two different CGI scripts on two different servers. One is a simple form handler with a nice _browser_out feature. The other is an email follow-up program which lacks the _browser_out feature.

So, is it possible to feed them both data by clicking one button???

-s-

ggrot

5:49 am on Nov 22, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm going to make the guess that for some reason you are unable to make changes to the scripts, through lack of knowledge or a server deficiency. Given that you can alter only the html on the page, there are a few creative possibilities. This cannot be done in any simple way - only with workarounds. The easiest thing I can think of is have the button call a javascript function which opens a new window that has all the form variables passed in the url and then submits the form in the current window.

sugarkane

12:13 pm on Nov 22, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Alternatively, it'd be possible to write a wrapper script which you call from the form. That script sorts out which form fields each script needs, and passes them on accordingly.

Could be done in a couple of lines of PHP if the destination scripts can be called with the GET method, if you need to use POST then I think Perl's LWP and related modules would be a better bet.