php select and clickable data display

  php, select

I use MySQL and I read the data from the database by clicking the data element for example:
The Bart is the first name, Simpson is the last name that is displayed from the database, but I want to make it clickable and pass the id so that can be displayed all information into the Form.
enter image description here

$con = mysqli_connect("localhost", "xxxxxx","xxxxxxx","xxxx");

// Check connection
if (mysqli_connect_errno()) {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();

$result = mysqli_query($con, "SELECT * FROM bgu_characters") or die(mysqli_error($con));

while($row = mysqli_fetch_array($result)){
        echo $color= "n<div class="list_character">";
        echo "<hr>";
        echo $row ['bgu_fname']." ";
        echo $row ['bgu_lname']. "<br>";
        echo $color .= "n</div>";

Source: Ask PHP