2 cgi script executions, is it possible?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi there experts,

I've set up a form with the help of my domain providers cgi script that
allows me to store the form values in a excel file and also xml file
for future downloads.  That page works fine by emailing me the results
and also stores the values on my sever space... I can't alter there cgi
script (because www.cedant.com doesn't want me too) so I'm trying to
extract the users email value, whatever they imput, and have that
become the TO: address to send to a dummy email address which I then
can forward (autoreply) some standard message back to the user.
<<--this is kind of like formmail.cgi

Currently the page I'm writing in all in html, but the tech guy at
cedant who was practically clueless of what I was asking him, told me I
could maybe do it through php???

I'm willing to do anything, but I really do want to keep the current
cgi for the form values--- can I excute more than 1 script with the hit
of the submit button?  I might just have to have use formmail.cgi but
I'm trying to avoid a second page of submitting (unless I maybe use a
cookie, right?)

Thanks for reading this,


Re: 2 cgi script executions, is it possible?


Some formmail scripts have a "realname" attribute that can included in
CGI form as a hidden attribute. this causes the script to spoof the
customers email address as the source of the form generated email. In
that case all you would have to do is include an autoresponder address
in the recipients list, and a form letter can be sent to a second


I am guessing that is what you want, yes?


Re: 2 cgi script executions, is it possible?

["Followup-To:" header set to comp.lang.perl.misc.]
Quoted text here. Click to load it

That could be the real problem, you really should have an ISP that allows
you to change CGI scripts. This is probably going to be a recurring

Quoted text here. Click to load it

You could probably do the whole thing through PHP, if you wanted to. This
would require re-writing and eliminating the perl CGI script entirely.

Quoted text here. Click to load it

No, and, Yes. :-) (Hope that helps..)

What you can do, is have the CGI script execute another script. This doesn't
work so well with the POST method, but it is possible. You have to set up the
environment (and in the case of POST, stdin) with the form values and then
execute the shell script. If you can't edit the cgi script, then you can't do
it there, have to do that in a way they allow.

Look for the popen type functions in PHP to do this, then, after all the work,
discover the ISP has the popen functions disabled for security reasons..

Personally, I'd recommend finding another ISP. (Kind of a personal rant of
mine, but at the least, an ISP should allow SSH shell access AND CGI access,
this is rare for the commodity <$20.00 hosts.) I have to deal with these type of
hosts quite frequently.

If the CGI script is working and you're happy with it, it would probably be a
heck of a lot easier and quicker to just modify it to suit your needs than it
would be to play gimmicks with multiple scripts.

Quoted text here. Click to load it

It's hard for me to understand exactly whats going on with the second
script, but I don't think cookies are all that relevant here.

http://www.geniegate.com Custom web programming
User Management Solutions                   Perl / PHP / Java / UNIX

Site Timeline