Jamesiv1 Posted March 17, 2009 Share Posted March 17, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/149900-solved-on-submit-form-posts-to-two-scripts/ Share on other sites More sharing options...
samshel Posted March 17, 2009 Share Posted March 17, 2009 try searching for help on CURL library. Quote Link to comment https://forums.phpfreaks.com/topic/149900-solved-on-submit-form-posts-to-two-scripts/#findComment-787236 Share on other sites More sharing options...
sasa Posted March 18, 2009 Share Posted March 18, 2009 just include this scripts Quote Link to comment https://forums.phpfreaks.com/topic/149900-solved-on-submit-form-posts-to-two-scripts/#findComment-787388 Share on other sites More sharing options...
Jamesiv1 Posted March 19, 2009 Author Share Posted March 19, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/149900-solved-on-submit-form-posts-to-two-scripts/#findComment-788144 Share on other sites More sharing options...
Jamesiv1 Posted October 22, 2010 Author Share Posted October 22, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/149900-solved-on-submit-form-posts-to-two-scripts/#findComment-1125250 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.