You will need to use ajax with the creation of interactive forms for the query
for example
in the column where you generate the name, you also generate the id, or other identifier attribute within the onclick function parameter, for example
<a onclick="maisDetalhes($Linha['id_event'])">Mais Informações</a><br />
takes this id by the parameter in the javascript function
funtion(id){
var formulario = document.CreateElement("form"); //cria um elemento form
formulario.id = "form1";
formulario.action "paginadosDados.php";
formulario.method = "POST"; //ou get seilá
var input1 = document.CreateElement("input");
input1.type = text;
input1.name = "input1";
input1.value = id; //parâmentro que vc acabou de enviar
formulario.appendChild(input1);
document.body.appendChild(formulario);
var data = $("#form1").serialize(); //pega o valor do form e envia sem recarregar
$.ajax({
type : 'POST',
url : 'paginadosDados.php', // substitua
data : data,
dataType: 'json',
beforeSend: function()
{
aqui vai a animação do carregando...
}
success : function(response){
if(response.codigo == "0"){
alert(response.mensagem);
}
}
});
}
php only returns what you want and sends the results to that part of the sequence
example
$retorno = array('codigo' => 0, 'mensagem' => 'oi');
echo json_encode($retorno);
exit();
Obs: line J-query to make it easier, this code I wrote here in the editor so it hasn’t been tested yet
Felipe, sorry for my inexperience, I did not understand a thing, the part of the sucess function, and what I will put code in the php page to show on the same page ?
– Gabriel Longatti
exactly, the sucess will only be executed if the action is successfully performed and returns the code 200, but that’s another matter.
– Felipe Duarte