PHP Form Submit button, how to handle

Source: Internet
Author: User
Tags php form php form submit
PHP Form Submit button

Own test wrote a message board, want to modify the function. , where there are 3 buttons, how can I click on different buttons to submit different content. Thank you very much.
The source code of only one button is probably as follows: (I want to add two buttons after the name, and the title, but also to implement the submission)


------Solution--------------------
This requirement has also been seen for the first time, the simplest way to write 3 form, each form inside a box and a submit
------Solution--------------------
Or you can look at Ajax and use Javascipt to do it.
However, the usual practice is to have only one submit button, the server side to determine whether the form value is empty, and then do the corresponding operation
------Solution--------------------
Why do you want to do that? Add a value to the form form, such as Button1 to filter out unwanted portions (button2.button3) when PHP receives the data.
The front desk of course also a lot of processing methods, but I really do not understand what you this is the demand
------Solution--------------------
As long as you give the three "OK" button to a different name, you can receive the submission of the PHP program processed separately

Unfortunately, there is only one commit button in your sample code, and you don't know where the two are?
  • Related Article

    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.