I have a simple navigation menu that's in a PHP file (nav.php) included for pages that need it. When I launch nav.php in a browser, itlinks to the pages its supposed to. So the first link, for example, I'm taken to: http://localhost/expenses/Pages/reports.php
as expected. All is well so far.
But when I include actually include nav.php in another file and click the first link, it takes me to: http://localhost/Pages/reports.php
. This makes NO sense and I can't figure out why it's doing this. The second file (dashboard.php - second block of code) just points to nav.php, but for some reason, it doesn't point to localhost\expenses\pages, but just localhost\pages.
<li><a href="../../Pages/user_management.php">User Management</a></li>
<li><a href="../../Pages/credit_card_management.php">Credit Card Management</a></li>
<?php include ("../includes/db_connection.php");?>
<?php include ("../includes/layouts/header.php");?>
<?php include ("../includes/layouts/nav.php");?>
<?php include ("../includes/layouts/menu.php");?>
<?php include ("../includes/layouts/footer.php");?>