<script src="http://code.jquery.com/jquery-1.7.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#navlist li a').click(function(){
$('#navlist .current').removeClass('current');
$(this).addClass('current');
return false;
});
});
</script>
<ul id="navlist">
<li><a href="?p=home" class="current">Home</a></li>
<li><a href="?p=product">Our Products</a></li>
<li><a href="?p=enquiry">Enquiry</a></li>
<li><a href="?p=contact">Contact Us</a></li>
<li><a href="?p=about">About Us</a></li>
</ul>
<div id="content">
<?php
require_once('config.php');
$default = 'home';
$page = isset($_GET['p']) ? $_GET['p'] : $default;
if (!file_exists($page.'.php'))
{
$page = $default;
}
include($page.'.php');
?>
</div>
javascript is used to add and remove class of anchor tag.
Without javascript menu loads pages to content div but when script works it only add and remove class of anchor tag. It stops loading pages to content div.