Php implementation of form multi-button submission action Processing Method

Source: Internet
Author: User
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.

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.