如何在上一页中单击时显示正确的名称

I have a list of nba teams which are in a table and the data is coming from a php database and whenever i click on the team name it directs me to the teams roster and displays to me the names of the players but i cannot get the name or the logo of each team to show up whenever that team is clicked, i will attach an image of how it should look like to give a better idea of what im talking about.

enter image description here

enter image description here

I have a folder with all the images corresponding to each team.

this is my teams code

<?php
$connection = mysqli_connect('localhost', 'root', '','nba201819'); 



$result = mysqli_query($connection,"SELECT * FROM teams");

echo "<table border ='1'>
<tr>
<th></th>
<th>Code</th>
<th>Team</th>
</tr>";

    while($row = mysqli_fetch_array($result))
    {

    echo "<tr>";
    echo "<td><img src='/logos/".$row['TEAMCODE']."'></td>" ;
    echo "<td>" . $row['TEAMCODE'] . "</td>";
    echo '<td><a href="roster.php?teamcode=' .$row['TEAMCODE'] .'">' . $row['NAME'] . "<a/></td>";
    echo "</tr>";

    }

    echo "</table>";
 ?>

this is my roster code

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Roster</title>
</head>
<body>
<header>
    <a href='teams.php'>Teams |</a>
    <a href='players.php'>Players |</a>
    <a href='teamStats.php'>Teams Stats |</a>
    <a href='playerStatsJS.php'>Player Stats JS |</a>
    <a href='playerFilterStatsJS.php'>Player Filter Stats JS |</a>
    <a href='liveGamesJS.php'>Live Games JS |</a>
    <a href='liveGamesUpdate.php'>Live Games Update |</a>
</header>
<hr>
<?php $teamcode = $_GET['teamcode']; ?>
<img src ="/logos/<?php echo $teamcode; ?>_logo.svg" width ="100" height="100">
<h1><?php echo $teamcode; ?> Roster </h1>
<hr>

</body>

<?php
error_reporting(E_ALL); ini_set('display_errors', 1);
$connection = mysqli_connect('localhost', 'root', '','nba201819');


$teamcode = $_GET['teamcode'];

$result = mysqli_query($connection,"SELECT * FROM players WHERE TEAMCODE = '$teamcode' ");

echo "<table border ='1'>
<tr>

<th>Name</th>
</tr>";

    while($row = mysqli_fetch_array($result))
    {

    echo "<tr>";

    echo "<td>" . $row['NAME'] . "</td>";

    echo "</tr>";

    }

    echo "</table>";

?>