get current page name for page active class
<?php
$url = basename($_SERVER['PHP_SELF']);
?>
//nav bar
<li <?= ($url === "dashboard.php") ? "class='active'"?>><a href='dashboard.php'> Dashboard</a></li>
<li <?= ($url === "bankdetails.php")? "class='active'"; ?>><a href="bankdetails.php"> Bank Account Details</a></li>