The user confirms whether the submission is correct. how can this problem be achieved?

Source: Internet
Author: User
The user confirms whether the submission is correct. how can this problem be achieved? After you upload an xls file, read the content in the file to $ aData in the array and display it on the page. Now you want to add a function that is something similar to two buttons: & quot; OK & quot; discard & quot; mysql_query ('begin') before reading the file '); after reading the data, enter it into the database and display the content on the page. if the user confirms whether the submission is correct, how can this problem be achieved?
After you upload an xls file, read the content in the file to $ aData in the array and display it on the page.
Now, you want to add a function that is similar to two buttons: "OK" "Give Up"
Before reading a file
Mysql_query ('begin ');

Read the data and enter it into the database. The data is displayed on the page,
If you click OK
Mysql_query ('commit ');

If you click discard
Mysql_query ('rollback ');

I don't know how to implement this verification function. Do I use the onclick button? How to obtain the return value? Or is there any other good method?

I don't want to jump to the next page to read the file again, because the content may take a lot of time!

------ Solution --------------------
PHP code
  
      
  
   
COMMIT
  
ROLLBACK

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.