I'm very much a beginner when it comes to PHP. I'm working on this project for my LAMP stack development class. This contacts page simply has a table that displays the contents of the contacts database. Right now, it's doing that just fine. However, the last column of the table is meant to be two buttons, one leading to the contact-update.php page, and one to the contact-delete.php page. This is the example our professor has given us:

However, I clearly don't understand redirect buttons in PHP well enough to get this working.
This is what my code looks like now. I'm just trying to put something in that last column of the table that displays those two buttons and brings you to an edit or delete page for whichever row you clicked the button of.
<?php
require 'config.php';
//php scripts will go here
//start new session
session_start();
//password protect this page
if (!isset($_SESSION['loggedin'])) {
header('Location: login.php');
exit;
}
$pdo = pdo_connect_mysql();
$stmt = $pdo->prepare('SELECT * FROM `contacts`');
$stmt->execute();
$contacts = $stmt->fetch(PDO::FETCH_ASSOC);
?>
<?= template_header("Contacts") ?>
<?= template_nav() ?>
<!-- START PAGE CONTENT -->
<?php if ($userResponses) : ?>
<p class="notification is-danger is-light">
<?php echo implode('<br>', $userResponses);
//var_dump ($_POST);
?>
</p>
<?php endif; ?>
<h1 class="title">Contacts</h1>
<table class="table">
<thead>
<tr>
<td>#</td>
<td>Name</td>
<td>Email</td>
<td>Phone</td>
<td>Title</td>
<td>Created</td>
<td></td>
</tr>
</thead>
<tbody>
<?php
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
echo "<tr>" .
"<td>" . $row["id"] . "</td>" .
"<td>" . $row["name"] . "</td>" .
"<td>" . $row["email"] . "</td>" .
"<td>" . $row["phone"] . "</td>" .
"<td>" . $row["title"] . "</td>" .
"<td>" . $row["created"] . "</td>" .
"<td>" .
"<div class="buttons">
<a href="?id=<?= $contact['id']?>&confirm=yes" class="button is-success">Yes</a>
<a href="?id=<?= $contact['id']?>&confirm=no" class="button is-danger">No</a>
</div>" .
"</td>" .
"</tr>";
}
?>
</tbody>
</table>
<!-- END PAGE CONTENT -->
<?= template_footer() ?>