Mysql
 sql >> Database >  >> RDS >> Mysql

carica un file di query php in una pagina di indice html usando ajax o jquery

$(document).ready(function() {

jQuery.ajax({
        type: "POST",  //  this is post request u can also do get request
        url: "query.php", 
        dataType: "text",

        success: function (response)  // this is the response from  url: "query.php",
        {
          alert(response);    //alert responce from  query.php and here you can do 
                              //                   whatever u like with response.
        },
        error:function (xhr, ajaxOptions, thrownError)
       {
          alert(xhr); // if any error function.

       }
});

});