Jump to content

is there a way to have a form submit to 2 different urls at one time??


mac007

Recommended Posts

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

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,

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

 

 

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

 

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.