I have a question. I searched the web but, I could not find how it is done.
I'm seeing a system already created, but I want to modify some things.
I have an Ingreso.php page with a code that brings me the values of the database.
$siniestro[] = array("cod_ref"=>$row[0],"ramo"=>$row[1],"fecha"=>htmlentities($row[2]), etc, etc, etc);
$this->respuesta=$siniestro;
return $this->respuesta;
which gives me a return response.
Well I read it with this:
$.getJSON("siniestro.php",{x:x},function(detalleFT){
$.each(detalleFT[0], function(key,valor){
$("#"+key).html(valor);
});
});
with this I get the values of my sinister page by ID, which I want to show them in input="text", but the input text appear empty, not so if I dump them in a for example, but what interests me is to make those editable fields in the input text but with the value already loaded in the IDs.
I do not know if my explanation is very clear.
maybe I'm picking them wrong by ID, or if it would be easier to pass it to php variables, I do not know, I need help on this topic, I'm a bit stuck.