PDA

View Full Version : form with 2 submit buttons



d-machine
10-01-2008, 01:28 PM
Hi

I've wondered what should I do if I have 2 submit buttons for 2 different actions, that the visitor can have in a web form.

* those actions are referring 2 different PHP pages.

Thanks

BabblingIdjit
10-02-2008, 05:46 AM
Have the page that the form submits to, check which submit button was pressed and either (1) execute the appropriate code; or (2) redirect to the appropriate page.

The form may submit back to itself to save creating an intermediate page.