PHP implementation of Form Multi-button submit action method, action processing method
There are two submit buttons in the form, to implement two different processes when clicking on a different submit button, and there is a way to share the process of implementing the form Multi-button submit action.
In PHP, a form of two buttons, the name of the button is set to the same, but the value is set to a different, after the form submitted, only need to determine the value of the submission can be transferred to different processing process, this method is reasonable, suitable for multiple buttons in a form.
Php method, the code is as follows:
<?php echo "$sub
\ n "; if ("s1" = = $sub) { ... } else if ("s2" = = $sub) { ... } ? >
The above is the PHP implementation of the form of multi-button submit action method, I hope that everyone's learning is helpful.
http://www.bkjia.com/PHPjc/1063895.html www.bkjia.com true http://www.bkjia.com/PHPjc/1063895.html techarticle PHP Implementation of the form of multi-button submission action, the action processing method of the form has two commit buttons, to achieve when you click on the different Submit button, respectively, two different processing ...