如何获取表中的特定行并显示到视图模式? [重复]

im new here! Im currently working in tables with edit and delete functions and Im using modals on it. now im having trouble with my view function. im using the codes shown in the below. it display all the data in my database instead of a specific one. can someone help me point out where i got wrong in my coding? below is a pic of my UI. thanks and Godbless

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">&times;</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: &nbsp; ' . $row['lname'] .',&nbsp; ' . $row['fname'] . '&nbsp;' . $row['mi'] . '.&nbsp;' . $row['suffix'] . '<br>
                    Gender: &nbsp;' . $row['sex'] . '<br>
                    Birthday: &nbsp;' . $row['birthdate'] . '<br>
                    Marital Status: &nbsp;' . $row['marital_stat'] . '<br>
                    Contact No: &nbsp;' . $row['contact_no'] . '<br>
                    Baranggay: &nbsp;' . $row['baranggay'] . ',&nbsp;' . $row['city_municipal'] . ',&nbsp;' . $row['province'] . ' ' ;

              }
            ?>



                        </div>
            <div class="modal-footer">
              <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
          </div>

        </div>
      </div>
</div>