I am trying to make a navigation script that will take me to a page named jobs.php and then on that page display another PHP navigation menu just for that page. I got that much working, but when I click a link on the jobs page, it does not include that page but simply dislpays that pages code. I am using this as my main navigation:
PHP Code:
<?php
switch($_GET["page"]) {
default: // Initial case
require('cpanel_home.php');
break;
case "content": // Content case
require('edit_content.php');
break;
case "jobs": // Jobs case
require('jobs.php');
break;
case "create_pages": // Create pages case
require('create_pages.php');
break;
case "statistics": // Statistics case
require('statistics.php');
break;
case "themes": // Themes case
require('themes.php');
break;
case "mail": // Mail case
require('mail.php');
break;
}
?>
And this as my job navigation:
PHP Code:
<?php
switch($_GET["action"]) {
default: //Original case
require('job_manager/default.php');
break;
case "search": //Search case
require('job_manager/search.php');
break;
case "add": //Add case
require('job_manager/add.php');
break;
case "update": //Update case
require('job_manager/update.php');
break;
case "view_all": //View all case
require('job_manager/view_all.php');
break;
case "delete": //Delete case
require('job_manager/delete.php');
break;
}
?>
The code for the jobs page is:
PHP Code:
<ul>
<li><a href="jobs.php">Main</a></li>
<li><a href="jobs.php?action=search">Search Jobs</a></li>
<li><a href="jobs.php?action=add">Add Job</a></li>
<li><a href="jobs.php?action=update">Update Jobs</a></li>
<li><a href="jobs.php?action=view_all">View All</a></li>
<li><a href="jobs.php?action=delete">Delete Jobs</a></li>
</ul>
<?php
require('job_nav.php');
?>
</body>
</html>
Is there a reason that it does not simply include the page in my code, but rather takes me to that page?
Bookmarks