how to do this:
on a page with a text box and a button
when the user writes what page he wants into the
textbox
and clicks the button
it looks for the file and create it with a php extension
and adds it to the page switcher
and case is added by putting the same query
whthout the extension
example
if the code of the page switcher is
CODE
<?php
$variable = $_GET['id'];
switch($variable) {
default: include('home.php'); break;
case "guestbook": include('guestbook.php'); break;
}
?>
$variable = $_GET['id'];
switch($variable) {
default: include('home.php'); break;
case "guestbook": include('guestbook.php'); break;
}
?>
the user writes forum.php
then the code will become
CODE
<?php
$variable = $_GET['id'];
switch($variable) {
default: include('home.php'); break;
case "guestbook": include('guestbook.php'); break;
case "forum": include('forum.php'); break;
}
?>
$variable = $_GET['id'];
switch($variable) {
default: include('home.php'); break;
case "guestbook": include('guestbook.php'); break;
case "forum": include('forum.php'); break;
}
?>


