I have started to code a website with a simple PHP dynamic page.
I am getting a error message on the homepage "Notice: Undefined index: page in C:\w\www\index.php on line 26". However the page does come up underneath the error. Can some one please take a look at the code and tell me what is wrong
This is what ive got
<html>
<head><title>My Portfolio</head>
<body bgcolor='#f1f1f1' text='#000000' link='#33cc00' alink='#33cc00' vlink='#33cc00'>
<table align='center' width='95%' bgcolor='#FFFFFF' style='border-color:#999999;border-style:solid;border-width:1px' border=0>
<tr>
<td align='center'>
<table width='100%'>
<img src='images/logo.png'>
</td>
</tr>
</table>
</table>
<br>
<table align='center' width='95%' bgcolor='#FFFFFF' style='border-color:#999999;border-style:solid;border-width:1px' border=0>
<tr>
<td align='center'>
<table width='100%'>
<font size='2' face='arial'><a href ="home.php">Home</a> | <a href ="2.php">Blog</a> | <a href ="home.php">Projects</a> | <a href ="">Contact</a></font>
</td>
</tr>
<td align='center'> <font size='2' face='arial'>
<?php
$page = $_GET['page'];
if (!$page)
$path = "inc/".$page.".php";
if (file_exists($path))
include($path);
else
{
echo "Sorry, This page does not exist, Please press the back button on your browser.";
}
?>
</font>
</td>
</table>
</table>
</body>
</html>