我是新来的!我目前正在使用具有编辑和删除功能的表,而我正在使用模态的表。现在我在查看功能上遇到了麻烦。即时通讯使用下面显示的代码。它显示数据库中的所有数据,而不是特定的数据。有人可以帮助我指出我的编码错误吗?下面是我的UI图片。谢谢,天哪
enter image description here
enter image description here
<!-- Modal view-->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title"><img src="user.png" width="50px" height="50px" id="blah" class="img-rounded"> Patient Information</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<?php
$patient_id="";
include("db.php");
$q = mysqli_query($conn,"SELECT
FROM
patient
WHERE
patient.patient_id - '$patient_id'");
while($row = mysqli_fetch_array($q)){
echo
'Fullname: ' . $row['lname'] .', ' . $row['fname'] . ' ' . $row['mi'] . '. ' . $row['suffix'] . '<br>
Gender: ' . $row['sex'] . '<br>
Birthday: ' . $row['birthdate'] . '<br>
Marital Status: ' . $row['marital_stat'] . '<br>
Contact No: ' . $row['contact_no'] . '<br>
Baranggay: ' . $row['baranggay'] . ', ' . $row['city_municipal'] . ', ' . $row['province'] . ' ' ;
}
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>