0
I have a script.js file that needs to capture a php variable, as I do?
Look what I got:
function atualizaFotos() {
$.ajax({
url: "imovel-fotos-id.php?cliente=&cod="
}).done(function (resposta) {
$("#fotos").html(resposta);
});
}
I have the client variable and the code variable. How to capture a php variable and pass it in this parameter?
I’m waiting for help!
Thank you very much!
I advise protecting variables
$var_cliente_php
and$var_codigo_php
withhtmlentities
and/orjson_encode
(treat UTF-8 if necessary).– user21448