My goal: To process three objectives:
(1) Make insertion in a staging table before processing payment.
(2) Go to third party payment processing site like paypal using my form action attribute.
(3) Read the $_POST data from the payment landing page to determine if payment was successful and then take the data from the staging table and insert into real table.
My desired implementation would sth like:
<form name=demo method=post onsubmit=<?php insertStagingData() ?> action=3rdpartyPaymentProcessingLink>
<input name =Submit typesubmit valueSubmit>
</form>
I know that the web browser executes the onsubmit handler and when the handler completes, the browser proceeds with the form submit. I have used this concept for java script client side validation before forwarding the form to web server for php processing.
I dont know if this can be done when both handlers require server side processing, one on my webserver and the second on a 3rd party site.
Thanks in advance for suggestions and help!