title: How do i call out according to the id when i click on specific row in my table form?
body: <p>This is the code where i select the button but it keep retrieving the first id even when i click on second id.</p>
  
  <pre><code>include "lib/mssql.connect.php";
  
      $sql = "SELECT * FROM tbl_adminip WHERE id =  id";
  
      // run the query
       $result = sqlsrv_query($conn, $sql);
       if($row = sqlsrv_fetch_array( $result, SQLSRV_FETCH_ASSOC))
          {
          ?&gt;
          &lt;div class="container"&gt;
              &lt;div class="row"&gt;
                  &lt;div class=" col-md-12 col-lg-12 col-sm-12 col-lg-12"&gt;
                      &lt;legend&gt;Edit IP&lt;/legend&gt;
                      &lt;p id="details"&gt;&lt;/p&gt;
  
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="modal fade"  id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"&gt;
                  &lt;div class="modal-dialog"&gt;
                      &lt;div class="modal-content"&gt;
                          &lt;div class="modal-header"&gt;
                              &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;×&lt;/button&gt;
                              &lt;h4 class="modal-title"&gt;Edit Duty Officer&lt;/h4&gt;
                          &lt;/div&gt;
                          &lt;div class="modal-body"&gt;
                              &lt;div id="display"&gt;
                              &lt;label class="col-lg-2 control-label"&gt;ID&lt;/label&gt;
                                  &lt;div class="col-lg-10"&gt;
  
                                      &lt;input type="text" class="form-control" id="txtid" value="&lt;?=$row['id'] ?&gt;" disabled=""&gt;
                                  &lt;/div&gt;
                                  &lt;label for="inputIP" class="col-lg-2 control-label"&gt;IP Address&lt;/label&gt;
                                  &lt;div id="ip" class="col-lg-10"&gt;
                                      &lt;input type="text" class="form-control" id="txtName" value="&lt;?=$row['adminip']; ?&gt;" placeholder="IP" data-content="Please enter your IP Address" data-container="body" data-toggle="popover" data-placement="bottom"&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="modal-footer"&gt;
                              &lt;button type="button" class="btn btn-default btn-sm" data-dismiss="modal"&gt;Cancel&lt;/button&gt;
                              &lt;button type="button" class="btn btn-danger btn-sm" onclick="AccountInfo()"&gt;Save&lt;/button&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>