mac007 Posted March 5, 2009 Share Posted March 5, 2009 Hi, all.. I have a form that we want people to fill with their basic info (name, email, address, etc), but I am having a problem since I want the info to be passed over to an auto-responder, and then be redirected to and ORDER page. The info gets passed just fine to the autoresponder, but hen how can I make so i can still be able to catch the posted form-fields back thru my ORDER-page? If I instead make so it goes directly to the ORDER page, i can capture the fields by turning the posted-fields into "sessions"... but then I cant seem to get those same posted fields go over to the auto-responder at same time... so I thought maybe I could simply have the form post to both at same time instantaneously... is there a way??? Like: <form action="page1.php, page2.php" method="post"> Appreciate any help... Link to comment https://forums.phpfreaks.com/topic/148021-is-there-a-way-to-have-a-form-submit-to-2-different-urls-at-one-time/ Share on other sites More sharing options...
phpdragon Posted March 5, 2009 Share Posted March 5, 2009 just use the top of your order page to send to the email auto responder then continue on with the order instead of a redirect, then you will still have the variables available to you Link to comment https://forums.phpfreaks.com/topic/148021-is-there-a-way-to-have-a-form-submit-to-2-different-urls-at-one-time/#findComment-776961 Share on other sites More sharing options...
rs_nayr Posted March 5, 2009 Share Posted March 5, 2009 sessions will help, just make sure you put session_start() on the top of your php page, this will make values available to all your page, another way is if you want to make the values from basic info page that is directed to auto-responder page available to order page you should put some form to your auto-responder page with form action="order.php" with the values coming from the basic info page, Link to comment https://forums.phpfreaks.com/topic/148021-is-there-a-way-to-have-a-form-submit-to-2-different-urls-at-one-time/#findComment-776967 Share on other sites More sharing options...
mac007 Posted March 5, 2009 Author Share Posted March 5, 2009 Thanks guys... I did think of putting a "duplicate" set of hidden fields somewhere in the autoresponder's page, except I dunno yet what or where that page is... it gets automatically send to specific "script" with the action being like: action="http://www.aweber.com/scripts/addlead.pl" (in this case it's Aweber's autoresponder), and so far not sure where that rests... On phpdragon's suggestion, how woudl i go about having a php scrip on my ORDER page "re-submit" all form values to that action (action="http://www.aweber.com/scripts/addlead.pl" once the posted form variables arrive there?? since I am not emailing to them, I am sending it thru form... woudl I s still be able to use the mail() function?? if so, how?? Link to comment https://forums.phpfreaks.com/topic/148021-is-there-a-way-to-have-a-form-submit-to-2-different-urls-at-one-time/#findComment-776986 Share on other sites More sharing options...
phpdragon Posted March 5, 2009 Share Posted March 5, 2009 what is the function of your auto responder, is that just an email sent to sales? or is it an email sent to client? Basically you would make the action of your form point to your order page, then $_POST your variables from the form, they are now accessible to your mail function and any other functions you want them for on that same page example order.php $name=$_POST['name']; $email=$_POST['email']; etc etc then you can add them to a database at this time if you wish then you could use the mail function then print your order form using any variables you need Link to comment https://forums.phpfreaks.com/topic/148021-is-there-a-way-to-have-a-form-submit-to-2-different-urls-at-one-time/#findComment-777027 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.