Forum Moderators: coopster
Thanks in advance!
<?php
if(isset($_GET['page'])){
switch($_GET['page']) {
case 'home' :
include 'news.php';
break;
case 'products' :
include 'products.inc.php';
break;
case 'contact' :
include 'contact.inc.php';
break;
case 'about' :
include 'about.inc.php';
break;
case 'links' :
include 'links.inc.php';
break;
}
}
else {
include('news.php');
}
?>
[somesitename.com...]
[somesitename.com...]
[somesitename.com...]
[somesitename.com...]
etc...
But the thing that I dont know is what script do I need to add to the one I have to make querystring for example:
[somesitename.com...]
I hope that's what you wanted. I modified this to echo the values, you'll need to make changes for your include files.
<?php
if(isset($_GET['page']) && isset($_GET['num'])) {
$testval = $_GET['page'];
$testval .= $_GET['num'];
switch($testval) {
case 'home1':
echo 'home 1.php';
break;
case 'home2':
echo 'home 2.php';
break;
case 'home3':
echo 'home 3.php';
break;
}
}
else if(isset($_GET['page'])){
switch($_GET['page']) {
case 'home' :
echo 'home.php';
break;
case 'products' :
echo 'products.inc.php';
break;
case 'contact' :
echo 'contact.inc.php';
break;
case 'about' :
echo 'about.inc.php';
break;
case 'links' :
echo 'links.inc.php';
break;
default:
echo 'Please check your selection';
break;
}
}
else {
echo 'news.php';
}
?>