PDA

View Full Version : PLease Help: Posting form data to TWO places


dariusm
07-01-2005, 05:43 PM
Is it possible to have data from a field posted to 2 different places upon hitting the submit button?

For example: The form is sort of a shopping cart... the user hits submit and the information is emailed to the webmaster, and other specific data is passed on to a cc processor - like paypal.

nikkiH
07-01-2005, 06:43 PM
Technically? No.
The normal way this would be handled would be to have the e-mail done by the same process that handles the rest of the processing. Like a shopping cart. It is handled sequentially, not simultaneously.

You could work around this by copying the form to another form, submitting that form to some other target that won't change the window location, such as an iframe, then submitting the original form, but that has a LOT of potential problems as opposed to just having the handler do it all.

Easiest way to do this without modifying the CC processing part is just to submit the form to say, handler.asp. The handler.asp page e-mails you, then passes the data on to the CC processor.

There may be other workarounds, but they are that -- workarounds. A form submits to one page, and when it submits, it goes away. The location changes, so the form can't be submitted a second time.