Here is my entire header page
<?php
if( !defined('IN_SITE') )
{
exit;
}
if( !defined('NO_ACCEPT_XHTML_HEADER') )
{
/* Accept-header Code by NeoThermic (www.neothermic.com). Modified as needed by MHobbit or David McKim. */
$accept_header = explode( ',', $_SERVER["HTTP_ACCEPT"]);
$xhtml_value = preg_grep( '/^application\/xhtml\+xml(;q=(0\.\d{1,5}|1\.0|[01]))?$/i', $accept_header);
$xhtml_value = array_values($xhtml_value); // reset the keys
if (count($xhtml_value) == 0)
{
$xhtmlxml = floatval(0.0); //if you're not specified anywhere, you don't support it
}
else
{
// now parse the XHTML value found for any q-value
if ( strpos($xhtml_value[0], 'q') === FALSE )
{
// with no q-value explicitly set, then your XHTML support is 1
$xhtmlxml = floatval(1.0);
}
else
{
// with one specified, lets obtain it
$qloc = strpos($xhtml_value[0], 'q');
$qvalue = substr($xhtml_value[0], $qloc + 2 ); //we add two to skip past the = sign
$xhtmlxml = floatval($qvalue);
}
}
//now do the above but for text/html
$html_value = preg_grep( '/^text\/html(;q=(0\.\d{1,5}|1\.0|[01]))?$/i', $accept_header);
$html_value = array_values($html_value); //reset the keys
if (count($html_value) == 0)
{
$texthtml = floatval(0.0); // if you're not specified anywhere, you dont' support it
}
else
{
// now parse the HTML value found for any q-value
if ( strpos($html_value[0], 'q') === FALSE )
{
// with no q-value explicitly set, then your HTML support is 1
$texthtml = floatval(1.0);
}
else
{
// with one specified, let's obtain it
$qloc = strpos($html_value[0], 'q');
$qvalue = substr($html_value[0], $qloc + 2 ); // we add two to skip past the = sign
$texthtml = floatval($qvalue);
}
}
if ($xhtmlxml > $texthtml || ($xhtmlxml == $texthtml && $texthtml > 0))
{
header("Content-type: application/xhtml+xml");
}
else
{
header("Content-type: text/html");
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<!-- GWP Site -->
<!-- Copyright (c) 2006 GarbageWars Productions. All rights reserved. -->
<!-- http://www.garbagewars.com -->
<head>
<title><?php echo PAGE_TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="./css/main.css" />
<link rel="stylesheet" type="text/css" href="./css/advertise.css" />
<link rel="stylesheet" type="text/css" href="./css/art.css" />
<link rel="stylesheet" type="text/css" href="./css/comics.css" />
<link rel="stylesheet" type="text/css" href="./css/contacts.css" />
<link rel="stylesheet" type="text/css" href="./css/donate.css" />
<link rel="stylesheet" type="text/css" href="./css/fanwork.css" />
</head>
<body>
<div id="wrapper">
<div id="header" align="center">
<div id="topmenu">
<ul>
<li class="first-li">
<a href="http://www.garbagewars.com"><img src="./images/site/buttons/home.png" alt="Home" /></a></li>
<li><a href="./comics.php"><img src="./images/site/buttons/comics.png" alt="Comics" /></a></li>
<li><a href="./art.php"><img src="./images/site/buttons/art.png" alt="Art" /></a></li>
<li><a href="./shop/"><img src="./images/site/buttons/shop.png" alt="Shop" /></a></li>
<li><a href="./extras.php"><img src="./images/site/buttons/extras.png" alt="Extras" /></a></li>
<li><a href="./contacts.php"><img src="./images/site/buttons/contacts.png" alt="Contacts" /></a></li>
<li><a href="./links.php"><img src="./images/site/buttons/links.png" alt="Links" /></a></li>
</ul>
</div>
</div>
<div id="gutter"></div>
I read that this code should fix my problem...
// set your charset in $mycharset
header("Content-type: text/html; charset=&");
After applying the code, it allows the link to show properly. However, it screws up the font size of my other links and it also (for some reason) pushes the page down in the content area of both art.php and contact.php as if there were like 9 <br /> in the code
Here is an image of what I am talking about after applying the code...
http://img96.imageshack.us/img96/5538/untitled1sr0.png
If I do not use the above code to get the urls to work with the "&" (&) symbol, but keep the & symbol in the url, then I get this error...
http://www.garbagewars.com/art.php
I didn't code the header file and I just recently started learning php, I hope someone can help me.
-David