Hi guys,
I have an issue.
First see my code.
1) index.php
<html>
<?php include 'header.php';?>
<div class = "nav">
<ul>
<li> Menu 1 </li>
<li> Menu 2 </li>
<li> Menu 3 </li>
<li> Menu 4 </li>
</ul>
</div>
<div id = "left-panel">
<ul class = "left-menu">
<li>Sub Menu 1 </li>
<li>Sub Menu 2 </li>
<li>Sub Menu 3 </li>
<li>Sub Menu 4 </li>
</ul>
</div>
<div class = "content">
<?php loadContent($config); ?>
</div>
<?php include 'footer.php' ?>
</html>
My Function is:
function loadContent($config)
{
if(empty($_GET['action']))
{
$_GET['action'] = "start";
}
$root = "include/".$_GET['action'].".php";
if(file_exists($root))
{
include($root);
}
}
No if I press the Menu 1 in the nav class I will redirect to index.php?action=category&item=Menu1
My question is can I detect the $_GET['item']; in the index page and print it. If so how can I ?
I want like
if (empty($_GET['item'])){
echo "No menu item selected";
}else{
$cat = $_GET['item'];
echo $cat;
}
at the top of the page

