Web Hosting Talk







View Full Version : PHP Script to act as middleman between HTML Form and CGI Script


DynamicHost
01-12-2005, 02:33 PM
Hi Everyone,
I've come across a few instances where this script idea would be very useful, so knowing that I can't help but think it must already be out there.

For those of use who want to make use of a Perl CGI script, it would be useful to be able to take an HTML form, Post that data to a PHP script where we can do whatever we like with the vars, then take those vars and post them to the CGI without the user having to submit twice. Anyone ever seen / used this before?

Cheers,
Matt

DanH
01-12-2005, 02:41 PM
Why would you want to do that? Couldn't use just post directly to the PHP or Perl form, I'm not sure of a way, maybe a include a file or something in the PHP file, or just automatically using js submit the form.

Maybe you could tell us the reasons why you need both a PHP and perl form?

DynamicHost
01-12-2005, 02:45 PM
Originally posted by DanH
Why would you want to do that? Couldn't use just post directly to the PHP or Perl form, I'm not sure of a way, maybe a include a file or something in the PHP file, or just automatically using js submit the form.

Maybe you could tell us the reasons why you need both a PHP and perl form?

It's mostly just for convenience, if an organization has a policy of all new web based coding should be done in PHP for time saving, however we have an old Perl script that would take a good full day to rewrite in PHP, it would be nice to be able to do. It's not a need, but rather than dig through old perl code, it would be nice to have the ability to just write my 3 lines of PHP and then let Perl do its thing.

Matt