Check box for database operations-php Tutorial

Source: Internet
Author: User
Check box database operation problem table name: sale_order table structure: IDorder_idnamequantityPriceAddressRegion this is now the case, the table content will be displayed on a page, and each record has a check box, check the record to be processed, click submit to summarize the selected data. my problem is how to process the selected data and summarize the data of the entire table. Check box operation database problems
Table name: sale_order
Table structure:
ID
Order_id
Name
Quantity
Price
Address
Region

Now, the table content will be displayed on a page, and each record has a check box. check the record to be processed and click submit.

Summarize and process selected data

My problem is how to process the selected data and summarize the data in the entire table.


------ Solution --------------------
Add , I think your problem may be the value attribute value, which is very simple. like me, insert the value = "" in the middle of the PHP code, and then output the data you recorded through echo, after you click "process data", you can find the data in $ _ POST ['checkbox']. you can use var_dump ($ _ POST ['checkbox']) to view the data.

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.