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