So, I want to show detail data from row that I clicked. I clicked from looping data showing in table. here is the code.
$fetchall = "SELECT * FROM data";
$result = mysqli_query($conn, $fetchall);
while($row = mysqli_fetch_array($result)){
$id2 = $row['id'];
$no_1 = $row['number'];
$status_1 = $row['status'];
<td style="font-size: 10pt; width:7px;background-color:#4C724A; opacity:0.7; color:white">
<a style="background-color:#5a85dd; color:white; padding:10px; border-radius:10px; margin-top:20px; " data-toggle="modal" data-target="#popUpIA<?php echo $row['id'] ?>"></a></td>}<?php}?>
and this is my modal code.
<div class="modal fade" id="popUpIA<?php echo $id2 ?>" tabindex="-1" role="dialog" aria-labelledby="popUpIATitle" aria-hidden="true">
<div class="modal-dialog modal-lg" style="background-color: #4C724A; width:50%" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="popUpIATitle"></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<!-- <table style="width:100%"> -->
the problem is, modal can only popup when i clicked the last record and only can get the last id