JSPX表单提交给PHP

JSPX表单提交给PHP

问题描述:

Is it possible to have a JSP/JSPX form to submit to a PHP file?

The PHP file will then be in charge of validation and database update. After that it will send a sort of response to the same JSP/JSPX form. Also this should be done in AJAX using jQuery.

How can I do that and what are the underlying concepts needed?

Thanks!

是否可以将JSP / JSPX表单提交给PHP文件? p> \ n

然后PHP文件将负责验证和数据库更新。 之后,它将对同一个JSP / JSPX表单发送一种响应。 这也应该在使用jQuery的AJAX中完成。 p>

我该怎么做?需要什么基础概念? p>

谢谢! p > div>

You don't need anything specific in your case. Just submit the form via Ajax using jQuery to the PHP page and process the result in JavaScript as well. All the code necessary for that will be client side in JavaScript and operate on the plain HTML generated by the JSP page. The only restriction/problem might be if these two pages run on different domains.