NYCPHP Meetup

NYPHP.org

[nycphp-talk] submitting two forms with one button - possible?

tedd tedd at sperling.com
Fri May 23 11:25:10 EDT 2008


At 8:27 AM -0700 5/22/08, Kristina Anderson wrote:
>I have a PHP page with two forms.  One form posts the form data and
>inserts it into the database.  The second form contains Paypal hidden
>variables and passes the transaction to the Paypal site.  This has to
>happen seamlessly with one button and I can't combine the two forms as
>Paypal form has standard format for their form...
>
>How to do this?  Can I call the second form submit programmatically at
>the end of the first form submit in PHP?  Or with Javascript on the
>second form submit call the first form to be submitted?
>-------------------
>Kristina

Kristina:

Another consideration is that PayPal provides a link back to your 
"Thank You page" -- so why not send your variables through PayPal via 
a GET, such as:

thankyou.php?<your variables>

 From there you can pick them up and put them in your database.

Cheers,

tedd
-- 
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com



More information about the talk mailing list