I am using switches to display pages on my index page, where my url is (http://) anime.centuragate.exofire.net/index.php?act=PAGE . I am having difficulties setting it up to work so that I can have a sub-page for the other ones like so (http://) anime.centuragate.exofire.net/index.php?act=PAGE&sub=SUBPAGE .
Here are some code snippets
To get the url and setup the text for the title tag:
Setting up the function and outputting the table:PHP Code:<?php
$location=$_GET['act'];
if (empty($location)) {
$location='home';
}
if ($location=='home') {
$title='Home';
}
elseif ($location=='directory') {
$title='Directory';
}
elseif ($location=='section_feed') {
$title='Section RSS';
}
?>
Outputting the correct pages:PHP Code:<?php
changelocation ($location);
function changelocation ($location) {
echo '<table border="0px" width="850px" cellpadding="0px" cellspacing="0px">
How would I be able to set it up so I can work with sub-pages according to the page it is associated with? (I hope that sentence made some sense. Hehe)PHP Code:<td class=content>
<center>
<script type="text/javascript" src="http://x10hosting.com/adserve.js?corporate"></script>
</center>';
switch ($location) {
case 'home':include ('main.php'); break;
case 'directory':include ('directory.php'); break;
case 'section_feed':include ('section_rss/index.php'); break;
}
echo '</td>


LinkBack URL
About LinkBacks
Reply With Quote

