Js Client php problems

Source: Internet
Author: User
Php on js client is a bit difficult. PHPcodewc (); is it a data insertion UDF echo & quot; & lt; script & gt; if (confirm (is the data parsed by the program correct? Are you sure you want to insert the file to the database? otherwise, cancel this operation and re-edit the excel file .)) {} else {window. history. go (-1) ;}& lt; script & gt; & quot; js Client php is a bit difficult
PHP code
  Wc (); // is a data insertion custom function echo "script" if (confirm ('is the data parsed by the program correct? Are you sure you want to insert the file to the database? otherwise, cancel this operation and re-edit the excel file. ') {} else {window. history. go (-1);} script "; // if confirmed, run the wc () function. if canceled, return to the previous page without the wc () function. Wc (inserted into the database );


How can I modify the statements of my code?
Similar to this
JScript code
  Return confirm ('are you sure you want to submit? /Are you sure? ');

Can I execute
PHP code
  exit


------ Solution --------------------
The correct process is

First, when the client submits the data, a prompt is displayed asking whether to confirm.

Then, submit the form to the server.

The server directly puts data into the database.

------ Solution --------------------
Script
If (confirm ('is the data parsed by the program correct? Are you sure you want to insert the file to the database? please cancel this operation and re-edit the excel file .')){
Window. location = 'WC. php ';
} Else {
Window. history. go (-1 );
}
Script

Run the wc () function in wc. php.
------ Solution --------------------
That's because your form data exceeds the post_max_size limit.

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.