I have the following code:
<table id="topMenu">
<tr>
<td>
<h1 class="siteName">Scarab Beetle</h1>
</td>
<?php
$stmt = $pdo->query("SELECT * FROM testtable01");
while ($row = $stmt->fetch()) {
echo "<td class='navItem'>" . "<a href='#'>" . $row['testmenu1'] . "</a>" . "</td>";
}
?>
</tr>
</table>
<!-- body text -->
<?php
echo "<p>" . $row['testsubmenu1'] . "</p>";
?>
What I am trying to do is when the ‘home’ page link is click, the data relating to home, is shown on index, and so on for the other menu items.
At the moment, I get an error message: Trying to access array offset on value of type bool .
I would like help on getting the text for home page displayed.
Thanks in advance.