I have this as a system to switch pages on a website:
<?php
if (! isset($_GET['page']))
{
include('./index.php');
} else {
$page = $_GET['page'];
switch($page)
{
case 'home':
include('./news.php');
break;
case 'downloads':
include('./downloads.php');
break;
case 'music':
include('./music.php');
break;
case 'gallery':
include('./gallery.php');
break;
case 'support':
include('./support.php');
break;
case 'history':
include('./history.php');
break;
case 'privacy':
include('./privacy.php');
break;
case 'ucsig':
include('./ucsig.php');
break;
default:
include('./news.php');
break;
}
}
?>
However, when you go to something like http://www.mysite.com/index.php then it just says it cannot display the page, it doesnt display the default value. Is there a way to stop this or is it just something I have to put up with?
Surely this is something that they've been thinking about for at best a few years and at worse 12 months? Could they not have launched 17.1 as 18, 17.2 as 19, 18.0 as 20 etc until they line up? It wouldn't fit the perfect new major os version with iPhone launch but there will probably be some folks in a few months asking what happened to iOS 19-25 (along with a tonne of youtube videos click baiting on it)
Question
Sir Topham Hatt
Hi!
I have this as a system to switch pages on a website:
However, when you go to something like http://www.mysite.com/index.php then it just says it cannot display the page, it doesnt display the default value. Is there a way to stop this or is it just something I have to put up with?
Cheers,
Peter
Link to comment
https://www.neowin.net/forum/topic/505404-php-switch-menu-system/Share on other sites
4 answers to this question
Recommended Posts