1 click submit 2 cgi <form>

I would like to submission form method post

1 button for 2 form

<form  method="POST" action="../cgi-bin/add.cgi">
<form  method="POST" action="http://www.some.com/cgi-bin/backup.cgi">

how should i do ?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rewrite your CGIs so that a single CGI handles both tasks or have the first CGI post to the the second.
tong111797Author Commented:
how to 1st cgi post to the second on remote host ?

i am very newbie..

thank for advance
Here's an example.

It first calls testmove.pl which then hands it off-- along with the variables that were passed to it-- to the experts-exchange cgi search script.

Here's the html page which references the first cgi
Search EE:<BR>
<form action="testmove.pl" method="post">
<input type=hidden name=ta value="57">
<input type=text size=30 name=search value=""><BR>
<input type=radio name=everything value="" checked>&nbsp;&nbsp;Search CGI Topic Area<br>
<input type=radio name=everything value=1>&nbsp;&nbsp;Search Everything<BR>
<input type="submit">

  use HTTP::Request::Common qw(POST);
  use LWP::UserAgent;
  use CGI;

  $myCGI = new CGI;
  $ua = new LWP::UserAgent;

# Create a hash of all the parameters
  foreach ($myCGI->param) { $myparams{$_} = $myCGI->param($_); }

  my $req = POST 'http://www.experts-exchange.com/bin/SimpleSearch', [ %myparams ];
  my $page = $ua->request($req)->as_string;

  $page =~ s#</head>#<base href="http://www.experts-exchange.com/"></head>#i;

  print $page;


If my server is up, you can check it out at:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tong111797Author Commented:
thankz. Look complex for me but it is a good code.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.