title: How to open modal from a link with id?
body: <p>I have a link that when the user clicks it, a modal will show containing the following:</p>
  
  <pre><code>&lt;?php
  
      include ('dbcontroller.php');
      if(isset($_GET['view_id']))
      {
          $id=$_GET['view_id'];
          $sql = mysqli_query($conn, "SELECT * from press where id='$id'");
          $row = mysqli_fetch_array($sql);
      ?&gt;  
  
      &lt;input type="hidden" value="&lt;?php echo  $row['id']; ?&gt;" /&gt;
      &lt;?php echo $row['reason']; ?&gt;
  
          &lt;a href="index.php" class="btn btn-primary"&gt;GO BACK&lt;/a&gt;
      &lt;?php 
      }
      $conn-&gt;close();
  ?&gt;
  </code></pre>
  
  <p>The code above is what I did so that when the user click the link, it will redirect him to that page. But i want it to be in modal dialog instead since it's not much content.</p>
  
  <p>This is the link that the user clicks. How will I open this link into a modal dialog?</p>
  
  <pre><code>&lt;a href="viewReason.php?view_id=&lt;?php echo $row['id'];?&gt;"&gt;Click to view &lt;/a&gt;
  </code></pre>
  
  <p>I've seen some on this site and elsewhere but all they have is a link without an ID to view modal dialog. I didn't find an issue same with mine so I decided to ask for help. </p>