Hi guys, beginner to php and websites here. Whenever I try to put links anywhere in the context section of a page, I get unexpected errors.. When I remove the links, the pages load fine.
Page is http://mainmedia.negative0.net/notfound.php
Here's the 404 page as an example:
/notfound.php
<?php
$page["title"] = "404 Error: Not Found";
$page["content"] = "<b>404 Error: Not Found</b>
<br /><br />
Howdy chum! Apparently the page you were looking for has been moved or deleted. Either that, or you've just typed random nonsense into the URL Box. Try clicking your browser's back button, or maybe the banner at the top of this page to go home. If you believe you're seeing this page in error then you should probably contact the administrator on the forums or via email.
<br /><br />
-- MainMedia Staff
<br /><br />";
include("page.php");
?>
/page.php
<html>
<head>
<title>MainMedia - <?php echo $page["title"]; ?></title>
<link rel='stylesheet' href='/chat/default.css' />
<meta http-equiv='Content-type' content='text/html;charset=UTF-8' />
</head>
<center><BR /><BR />
<body>
<div class="container">
<a href="/index.php">
<center><img style="margin-top:6px" border="0" src="/chat/mainmedia.jpg" width="735" height="170" alt="MainMedia" title="MainMedia Home" /></a></center>
<div class="header">
<div class="head-r">
<div class="head-l">
</div>
</div>
</div>
<center>
<div class="content">
<?php echo $page["content"]; ?>
</div>
</div>
<br />
<div class="footer">
© MainMedia 2010
</div>
</center>
<BR />
</body>
</html>
And finally /chat/default.css
/* BODY DECLARATIONS */
body
{
background-color:#000000;
background-image:url("/chat/bg.png");
}
/* DIVISION DECLARATIONS */
div.container
{
width:736px;
border:1px solid #AAAAAA;
margin-top:5px;
}
div.header
{
position:relative;
height:91px;
overflow:hidden;
background: url("/chat/head.png") repeat-x;
}
div.head-r
{
height:91px;
background: url("/chat/head-l.png") 0 0 no-repeat;
position:relative
}
div.head-l
{
height:91px;
background: url("/chat/head-r.png") 100% 0 no-repeat;
position:relative
}
div.menu
{
background-color:#1E1E1E;
border-left:1px solid #000000;
border-right:1px solid #000000;
border-top:1px solid #AAAAAA;
border-bottom:0px solid #000000;
font:12px verdana;
}
div.content
{
color:#FFFFFF;
padding:8px;
background-color:#1E1E1E;
border-left:1px solid #000000;
border-right:1px solid #000000;
border-bottom:1px solid #000000;
font:13px verdana;
}
div.footer
{
width:735px;
color:#FFFFFF;
background-color:#000000;
border:1px solid #AAAAAA;
font:small-caps 12px verdana;
}
table.menu
{
width:735px;
table-layout:fixed;
font:small-caps 12px arial;
}
/* LINK DECLARATIONS */
/* NORMAL */
a:link
{
color:#FFFFFF;
}
a:visited
{
color:#FFFFFF;
}
a:hover
{
color:#FFFFFF;
}
a:active
{
color:#FFFFFF;
}
/* MENU */
a.menu:link
{
color:#000000;
text-decoration:none;
}
a.menu:visited
{
color:#000000;
text-decoration:none;
}
a.menu:hover
{
color:#000000;
text-decoration:none;
}
a.menu:active
{
color:#000000;
text-decoration:none;
}
/* FOOTER */
a.footer:link
{
color:#FFFFFF;
text-decoration:none;
}
a.footer:visited
{
color:#FFFFFF;
text-decoration:none;
}
a.footer:hover
{
color:#FFFFFF;
text-decoration:none;
}
a.footer:active
{
color:#FFFFFF;
text-decoration:none;
}
/* OTHER DECLARATIONS */
/* CHAT LOGIN */
div.chatlogin
{
width:275px;
height:130px;
border:1px solid #AAAAAA;
float:right;
font:15px verdana;
}
table.chatlogin
{
width:275px;
height:130px;
background-color:#4F4F4F;
border:bold 1px solid #000000;
font:bold 15px verdana;
}
This bug also works for other pages, not just the 404 one...
Any help is greatly appreciated, thanks.
Jason