Php implementation of form multi-button submission action processing method

Source: Internet
Author: User
This article mainly introduces how to implement the php multi-button form submission action. For more information, see the following two submit buttons in the form, there are two different processing procedures. here we will share with you how to implement multi-button form submission action.

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:

<? Php echo "$ 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.