and I have that working however if I dont include the ?id=gallery or ?id=anything and just do www.mydomain.com it returns the error
Notice: Undefined index: id in C:\server\www\kattest\index.php on line 2
I know this has been asked many times before in the forums, and I've searched and tried every possible way with similar results.
The Code I Am Using Now:
<?php
$id = $_GET['id'];
switch($id)
{
case "home":
include('assets/content/home.php');
break; case "page":
include('page.php');
break; case "page2":
include('otherpage.php');
break; case "contact":
include('contact.php');
default:
include('assets/content/home.php');
}
?>
Ive even tried this way
<?php
require('header.php');
$page = $_GET['page'];
if (($page == "home") or ($page =="")) {
include('news/news.php');
} else if($page == "projects") {
include('content/projects.html');
} require('footer.php');
?>
Edit: I of course edited this code to suit my need (I know it doesnt match the same navigation as the one before I just hurried to copy and paste)With similar results saying undefined index page or something of the like.
Since these arent critical errors, I can probably fix them by turning off notices in my php installation (since they're both just notices) But I need to know how to do this (or a fix to the code)
Either way would work, thanks in advance.
Edit: Fixed it, to turn off notices I just added error_reporting(0); to the beginning of the php script.
Edited by raenef, 11 July 2005 - 10:22 PM.
