使用模态在同一页面上显示记录的详细信息

I have a lot of records that I am importing from SQL Server on a PHP web page. Because the table has a lot of columns, I want to display only the ID number and a few other columns on the main page, and when user click on the ID, a modal (bootstrap) pops up with more details of the record (that I can edit, then save)

All the solution I found online have the same approach: using an anchor tag. However, I want to display the results on the same page with no reload.

This is the raw data that I am displaying on the main page:

while( $row = sqlsrv_fetch_array( $result, SQLSRV_FETCH_BOTH) )
{
    $output .= '<tr>
        <td><a href="#" class="a-style" data-target="#change-view-modal" data-toggle="modal">' . $row[0] . '</a></td>
        <td>' . $row[1] . '</td>
        <td>' . $row[2] . '</td>
        <td>' . $row[3] . '</td>
     </tr>';
}


$row[0] is the ID.
I tried this approach but didn't work:

<td><a href="#" class="a-style" id="' . $row[0] .'" data-target="#change-view-modal" data-toggle="modal">' . $row[0] . '</a></td>
SQL file:

<?php 
    if(isset($_GET['id'])){
    echo "works";
    }
?>


I tried my best finding a solution to this problem, but if you find that there's a solution already please let me know and I will delete this question. I am new to PHP and working with backend servers. Again to clarify, I do not want to use anchor tags because they'll redirect me to a new page.