I am a newbie exploring php , kindly pardon me if i look silly also since i exactly don't know how to title this, i titled what i felt to be relative .
I have a login form which have inputs email,password and usertype dropdown
Based on usertype selected, table will be selected in db
Logged in user will be redirected to account.php which looks like below
<?php require_once("header.php"); ?>
<?php require_once("top_bar.php"); ?>
<?php require_once("left_side_nav.php"); ?>
<!-- MAIN CONTENTS START -->
<?php
if(isset($_SESSION['login_type']) && $_SESSION['login_type'] = 'admin')
{
require_once("a_inner_dash.php");
}
else if(isset($_SESSION['login_type']) && $_SESSION['login_type'] = 'user')
{
require_once("u_inner_dash.php");
}
else if(isset($_SESSION['login_type']) && $_SESSION['login_type'] = 'accountant')
{
require_once("ac_inner_dash.php");
}
?>
<!-- MAIN CONTENTS END -->
<?php require_once("footer.php"); ?>
The file "left_side_nav.php"
is as below
<!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu">
<li class="header">MAIN NAVIGATION</li>
<li>
<a href="account.php">
<i class="fa fa-dashboard"></i> <span>Account</span>
</a>
</li>
<li>
<a href="#">
<i class="fa fa-male"></i> <span>Menu1</span>
</a>
</li>
<li>
<a href="#">
<i class="fa fa-child"></i> <span>Menu2</span>
</a>
</li>
<li>
<a href="#">
<i class="fa fa-group"></i> <span>Menu3</span>
</a>
</li>
</ul>
</section>
<!-- /.sidebar -->
</aside>
Now my issue is, When i logged in as admin and i click a menu item for instance Menu1 the result should be on "a_inner_dash.php"
and if i logged in as User and click on menu item the result should be on "u_inner_dash.php"
and as you see in account.php it's just a part in a webpage
i tried and couldn't sort out a way . Kindly help me please
Note : The logged in user type is correctly been detected and the correct main content URL is been loaded. The issue is i don't know how to reference the menu from navbar to here which is a part of webpage