Forum Moderators: coopster
<?php
require('header.php');
$page = $_GET['page'];
if (($page == "home") or ($page =="")) {
include('home.php');
} else if($page == "guestbook") {
include('content/guestbook.txt');
}
....
else if($page == "domain") {
include('content/domain.txt');
} require('footer.php');
?>
adn all my links and everything is working fine so far. I have one question. Within my sections there are some subsections. Under domain for example, there could be hosting, history, and hosted. Is there any way that instead of adding the subsections to $page, that I can create a new variable ($id for example) so that the site is easier to control? so (and I'm guessing here) that the link is something like:
index.php?page=domain?id=hosting
I'm pretty sure that I can't do what I wrote above, but just for the sake of clarification. Hope someone can help me. thanks:
bivium
<?PHP
require('header.php');
$page = $_GET["page"];
$id = $_GET["id"];
if ($page == "") {
include("home.php");
} else {
include("$page.txt");
}
// do something with your category id saved in $id
// for example: underline the category link to show the user
// he is in that category.
?>
Best regards
Adrian
content/
domain.txt
design.txt
domain/
hosting.txt
hosted.txt
so $id would serve as the variable for the subfolders (domain in this case)... but I guess that is just making my life harder? well just wondering, the help you gave me helps me tons... thanks!
bivium