SeattleMicah
01-09-2012, 06:20 AM
Hello this is my first website using php so bare with me I am still trying to get use to syntax and basics!
I have my index.php set up with my various includes (is this a sloppy way of dynamically linking the static assets? please advise).
<?php
include('includes/header.html');
include('includes/nav.html');
if ($_GET['page'] == "social")
{
include('includes/social.html');
}
else if($_GET['page'] == "technological")
{
include('includes/technological.html');
}
else if($_GET['page'] == "geographic")
{
include('includes/geographic.html');
}
else if($_GET['page'] == "login")
{
include('includes/login.html');
}
else if($_GET['page'] == "register")
{
include('includes/register.html');
}
else if($_GET['page'] == "gotcode")
{
include('includes/gotcode.html');
}
else
{
include('includes/home.html');
}
include('includes/footer.html');
?>
I am receiving these errors when viewing index.php, looks like the variable for page? is undefined?
( ! ) Notice: Undefined index: page in C:\wamp\www\index.php on line 7
( ! ) Notice: Undefined index: page in C:\wamp\www\index.php on line 11
( ! ) Notice: Undefined index: page in C:\wamp\www\index.php on line 15
( ! ) Notice: Undefined index: page in C:\wamp\www\index.php on line 19
( ! ) Notice: Undefined index: page in C:\wamp\www\index.php on line
( ! ) Notice: Undefined index: page in C:\wamp\www\index.php on line 27
Thank you
I have my index.php set up with my various includes (is this a sloppy way of dynamically linking the static assets? please advise).
<?php
include('includes/header.html');
include('includes/nav.html');
if ($_GET['page'] == "social")
{
include('includes/social.html');
}
else if($_GET['page'] == "technological")
{
include('includes/technological.html');
}
else if($_GET['page'] == "geographic")
{
include('includes/geographic.html');
}
else if($_GET['page'] == "login")
{
include('includes/login.html');
}
else if($_GET['page'] == "register")
{
include('includes/register.html');
}
else if($_GET['page'] == "gotcode")
{
include('includes/gotcode.html');
}
else
{
include('includes/home.html');
}
include('includes/footer.html');
?>
I am receiving these errors when viewing index.php, looks like the variable for page? is undefined?
( ! ) Notice: Undefined index: page in C:\wamp\www\index.php on line 7
( ! ) Notice: Undefined index: page in C:\wamp\www\index.php on line 11
( ! ) Notice: Undefined index: page in C:\wamp\www\index.php on line 15
( ! ) Notice: Undefined index: page in C:\wamp\www\index.php on line 19
( ! ) Notice: Undefined index: page in C:\wamp\www\index.php on line
( ! ) Notice: Undefined index: page in C:\wamp\www\index.php on line 27
Thank you