liam_tmt7
07-15-2003, 05:55 PM
Its funny how php programers see the $$ sign and instaly think cash, but no my friend you are wrong. Its a trick to get you to come into my thread and help me for free :-) please.
I am using the following piece of code:
<?php
switch( $_GET['page'] ) {
case 'home' :
include 'main.php';
break;
case 'portfolio' :
include 'portfolio.php';
switch ($_GET['id']) {
default:
echo "portfolio.php";
break;
case "design";
echo "design";
break;
case "maintenance";
echo "maintenace.php";
break;
case "flyer";
echo "flyer.php";
break;
case "card";
echo "card.php";
break;
case "graphic";
echo "graphic.php";
break;
case "program";
echo "program.php";
break;
}
break;
case 'design' :
include 'design.php';
break;
case 'hosting' :
include 'hosting.php';
break;
case 'templates' :
include 'tesmplates.php';
break;
case 'contact' :
include 'contact.php';
break;
case 'services' :
include 'services.php';
break;
default:
include 'main.php';
break;
}
?>
but when i load index.php?page=portfolio&id=design it loads the portfolio page, even though design exisits.
can anyone tell me where I am going wrong, or the correct code please?
cheers guys
Liam
I am using the following piece of code:
<?php
switch( $_GET['page'] ) {
case 'home' :
include 'main.php';
break;
case 'portfolio' :
include 'portfolio.php';
switch ($_GET['id']) {
default:
echo "portfolio.php";
break;
case "design";
echo "design";
break;
case "maintenance";
echo "maintenace.php";
break;
case "flyer";
echo "flyer.php";
break;
case "card";
echo "card.php";
break;
case "graphic";
echo "graphic.php";
break;
case "program";
echo "program.php";
break;
}
break;
case 'design' :
include 'design.php';
break;
case 'hosting' :
include 'hosting.php';
break;
case 'templates' :
include 'tesmplates.php';
break;
case 'contact' :
include 'contact.php';
break;
case 'services' :
include 'services.php';
break;
default:
include 'main.php';
break;
}
?>
but when i load index.php?page=portfolio&id=design it loads the portfolio page, even though design exisits.
can anyone tell me where I am going wrong, or the correct code please?
cheers guys
Liam
