I have a table which has a button in each row to show details of each record. what I need is to pass selected data row to modal.
here is my PHP code for display dat
What you need is an Ajax call inside $('#detail').on('show.bs.modal', function (e) { }
to fetch data against $row['id_site']
file.php
query($sql);
if($result->num_rows > 0){
while ($row = $result->fetch_assoc()) {
echo "
ID Site
: $row[id_site]
Nama Site
: $row[name_site]
Witel
: $row[witel]
OLT Hostname
: $row[olt]
IP OLT
: $row[ip_olt]
Port OLT
: $row[port_olt]
IP ONT
: $row[ip_ont]
";
}
}
}
?>