Assistance is required in resolving the issue of queries to the database and their display on the html page. There is a request with two parameters: p1 and: p2, I collect these parameters with 2 value in 2 drop-down html lists. It is necessary that when selecting the 2 desired positions and clicking on the button, a query was made to the database and immediately output data from there to the html form. What is the best way to do this?
So far, only managed to return the collected data from these 2 lists.
$(function () { $("form").bind('submit', function (e) { e.preventDefault(); var form = $("form").serialize(); $("#results").text(form); var form = $(this), serialize = form.serialize(); }); }); I just can’t figure out how to transfer data from JS to a PHP script and how to substitute them there in the values: p1 and: p2, and even so that it all works asynchronously.