I am having a problem with my php files not linking to the stylesheet when the link is inside a function. The link will work fine if I code it into the main script outside of the php section.
Here is what I have coded as the main script:
[php]
<?php require_once('functions/rhs72rams_fns.php'); session_start(); $_SESSION['ID'] = 'Non-Member'; do_non_member_header('RHS Class of 1972') ?><div class="content">
content ges here
</div>
[/php]
The do_non_member_header() uses this code:
[php]
function do_non_member_header($title = ’ ')
{
?>
<html xmlns="“http://www.w3.org/1999/xhtml” lang = “en” xml: lang = “en”>
<head>
<meta http-equiv="Content Type" content ="text/html";
charset ="ISO-8859-1" />
<meta name = "Author" Content = "Michael Burden" />
<meta name = "Created Date" content = "12/10/2012" />
<meta name = "Company" content = "MTB Enterprises" />
<meta name = "Modified Date" Content = "12/11/2012 />
<title><?php echo $title; ?></title>
<link rel="stylesheet" type="text/css" href="css/rhs72rams_main.css" />
</head>
<body>
<body>
<div class="container">
<div class="header"><a href="#">
<img src="images/RiverviewHighSchool.jpg"
alt="Ram's Head" name="Logo" width="960"
height="160" id="Insert_logo" /> </a>
<!-- end .header --></div>
<div class="sidebar1">
<ul class="nav">
<li> <a href="login.php">Log-In</a></li>
<li><a href="/index.php">Welcome</a></li>
<li><a href="/contact.php">Contact Us</a></li>
<li><a href="https://www.facebook.com/#!/groups/117326885027939/">Facebook Link</a></li>
</ul>
<p> </p>
<!-- end .sidebar1 --></div>
<?php
}
[/php]
The fil structure looks like this:
rhs72rams.com
-index.php
/css
-rhs72rams_main.css
/functions
-output_fns.php (this is where the do_non_member_header() functions reside.)
As I said the rest of the function works properly, and if I code the link into the main script it works fine as well.