displayCategories.html.php
<?php
session_start();
?>
<table>
<tr>
<th>Category Name</th>
<th>Description</th>
<th>Edit</th>
</tr>
<?php foreach ($_SESSION['categoryRows'] as $row):
$categoryName = $row["CategoryName"];
$description = $row["Description"];
$categoryId = $row["CategoryId"];
$url = "templates/displayCategories.html.php";
?>
<?php if (isset($_GET['id']) && ($_GET['id'] == $categoryId)):?>
<form>abc</form>
<?php else:?>
<tr>
<td><?= $categoryName ?></td>
<td><?= $description ?></td>
<td><a href="<?= $url ?>?id=<?= $categoryId ?>">Edit</a></td>
</tr>
<?php endif;?>
<?php endforeach;?>
</table>
When I click Edit the link becomes from
templates/displayCategories.html.php
to
templates/templates/displayCategories.html.php
There are two templates in url! How so?