On a php page, main.php, I have an html form with post method. It starts out something like this:

<form method="post" action="https://checkout.google.com/blah/blah/blah

In addition to doing the post to checkout.google.com, I would also like to execute some php code on main.php. How do I code the form post action to do this?

I think what I am really asking is if there is a way to have 2 actions when you post a form, and how best to do that.

Recommended Answers

You can't have 2 actions on a simple form. You can however redirect from the first location to a second. Some external sites even give you the option of a callback or a location to go back to.

You could also set up a curl routine to send data from …

Jump to Post

All 2 Replies

Member Avatar

You can't have 2 actions on a simple form. You can however redirect from the first location to a second. Some external sites even give you the option of a callback or a location to go back to.

You could also set up a curl routine to send data from the main.php page to the google page and wait for a response and then carry on processing.

is this google wallet related?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.