Ideally you just get the ID of each record of your table and do an Ajax to get the other results. Since you are already using jQuery, you would need to do an ajax in some PHP that queries these values and returns.
function getInfoById(meu_id){
$.ajax({
type:'GET',
dataType: 'json',
url: 'getDados.php',
data: {
id: meu_id
}
success: function(dados){
$("#resultados").html("Nome: " + dados.nome + ", idade: " + dados.idade);
}
});
}
After receiving the ID parameter and doing the query, you return the JSON result using json_encode. Receiving this object of information from that single record, you can already use it to create the modal or display elsewhere quietly with jQuery, as in the example above.
Here are examples of how to work with Ajax and PHP together:
Enter the code of both things and how you are doing at the moment. Without code it is difficult to help
– Isac
I guess you don’t want the page to refresh to load the data, right? So you will have to work with Ajax requests (it is a possibility) to update a div, which in turn would be just this side panel that you mentioned. In short: your Ajax request will call a PHP script that will return the data, your jQuery takes this data and populates the side panel.
– Fábio Jânio