Sin Zero
New Member
- Messages
- 17
- Reaction score
- 0
- Points
- 0
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:
Outputting the correct pages:
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)
Here are some code snippets
To get the url and setup the text for the title tag:
PHP:
<?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';
}
?>
PHP:
<?php
changelocation ($location);
function changelocation ($location) {
echo '<table border="0px" width="850px" cellpadding="0px" cellspacing="0px">
PHP:
<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>