PHP Switch Navigation

software development

#1

I recently moved a website I created from my working directory to it’s own domain, so, say from ‘/website.com/out/stuff’ to ‘/newwebsite.com/’. For this website I use a PHP switch statement with the variable $id to do my navigation (I’ll include the code at the bottom). Within the working directory, all of this worked flawlessly, but since the move it loads the default pointer and any navigation after that simply does not work.

Here is the code for index.php:

<?php switch($id) { case "home": include("index2.php"); break; case "location": include("location.php"); break; case "cottage": include("cottage.php"); break; case "info": include("info.php"); break; default: include("index2.php"); break; } ?>

#2

Read this. Essentially, you will need to use $_GET[‘id’] instead of just $id.


si-blog | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]