Thanks in advance to all who can help me with this doubt. I'm just starting with JQUERY and I'm trying to make a form that should do some calculations based on data that returns a db with a query in external file in php. Based on everything I have searched and read, I have the following file in PHP that makes the query (It is proven and returns data). (turi.php)
And this is the jquery code, which I ask you to activate when changing a select
$(document).ready(function() {
$('#destinos').change(function() {
$.ajax({
type: "POST",
dataType: 'json',
data: {filtro: "FsL", limit: 15},
url: "turi.php",
success : function(resp) {
// Aquí debería poder recorrer el resultado que devuelve la consulta... creo :)
},
error : function(resp) {
alert("Error");
}
})
})});
To have me return an object and be able to go through it. And based on other data that the user loads, I do a calculation.
I hope it's clear.
Again, Thank you