This article mainly introduces how to implement multi-button form submission action in php. For more information, see
This article mainly introduces how to implement multi-button form submission action in php. For more information, see
There are two submission buttons in the form. When you click different submission buttons, two different processing processes are performed respectively, here, we will share with you how to implement multi-button form submission actions.
In PHP, two buttons in a form have the same name attribute but different values. After the form is submitted, you only need to determine the submitted value to go to different processing procedures. This method is reasonable and is suitable for multiple buttons in a form.
PHP method, the Code is as follows:
<? Phpecho "$ sub
\ N "; if (" s1 "==$ sub) {...} else if (" s2 "==$ sub) {...}?>?>
The above is the php method for implementing the multi-button form submission action, and I hope it will be helpful for your learning.