PHP implementation Form Multi-button submit action method, action method _php tutorial

Source: Internet
Author: User

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 ...

  • 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.