How to use checkbox to write SQL statements

Source: Internet
Author: User
How to use checkbox to write an SQL statement? I select * to open all the data in my table. before each data entry, I add & lt; inputtype = checkbox & quot; & gt; after I select several checkbox points that I need to submit, how can I transfer the data I need to the specified page for processing? How to write SQL statements? Thank you for writing SQL statements in combination with checkbox.
I select * open all the data in my table. I added After I select several checkbox points that I need to submit, how can I transfer the data I need to the specified page for processing? How to write SQL statements? Thank you.

------ Solution --------------------
Print_r ($ _ POST); // the selected content will be included in the content.
------ Solution --------------------
PHP code
  
------ Solution --------------------
Each table has a primary key with a unique value.
Generally, the name is id.

You only need to pass this id, you can locate the record in the database through this id


After submission, $ _ POST ['box'] is an array composed of all selected IDs.
------ Solution --------------------
Discussion
If I want to pass the data obtained from the database corresponding to input, do I need to set the name parameter in input to the same name as the name of the data corresponding to the database?

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.