Jump to content

[SOLVED] On Submit, form posts to two scripts


Jamesiv1

Recommended Posts

Hello Everyone,

 

I'm not a programmer, so please bear with me.

 

I have a form, and on submit, need for it to send the data 1. to formmail.cgi (a PERL script) that emails me the information and then 2. sends the data to a shopping cart script called phpcart.php

 

I'm told the best way to do this, is to have the forms ACTION post to a php script, which executes the two scripts above.

 

I imagine something like this:

 

<?php

send data to formmail.cgi.  When finished

send data to phpcart.php

exit

?>

 

I've installed a few PHP applications on my site, but writing code is beyond me.

 

Can anyone help?

 

I would surely appreciate it.

 

James

 

Thank you so much samshel and sasa.

 

samshel --- I first tried the curl deal, and it was pretty involved.  Got it working to a degree, though.

 

sasa --- the includes works great!  Took a little doing to get the formmail script to behave properly, but it's all working now.

 

Thanks again, both of you.

 

James

  • 1 year later...

For any non-programmers (like me) reading this thread, I thought I would post the solution.  Looks like this:

 

<?php

include ('formmail.cgi');

include ('phpcart/phpcart-m.php');

?>

 

It is so simple, it's brilliant :)

 

I've been using this for over a year now, and it works great.

 

James

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.