2 cgi script executions, is it possible?

  • Thread starter Douglas McCormick Jr.
  • Start date
D

Douglas McCormick Jr.

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,

Doug
 
S

shrike

Howdy,

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
address.

form->cgi->recipient1->you
recipient2->autoresponder->customer.

I am guessing that is what you want, yes?

-FWIW
-Matt
 
A

Average_Joe

["Followup-To:" header set to comp.lang.perl.misc.]
Hi there experts,

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)

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
problem.
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???

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.
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?

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.
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?)

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.

Jamie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,144
Latest member
KetoBaseReviews
Top