Forum Moderators: coopster
Include:
<?php
function the_header($css)
{
$header = "<head>\n";
$header = css;
$header .= "<link rel='stylesheet' type='text/css' href='".$css."css.css'>\n";
$header .= "<title>Operartions Website../".$title."</title>\n";
$header .= "</head>\n";
$header .= "<body marginheight='5' marginwidth='5' leftmargin='15' topmargin='5'>\n";
return ($header);
}
?>
Index
<?php
$css = "css/";
include ("includes/header_footer.php");
$css = "css/";
print the_header($header,$css);
print $css;
I see a couple of issues with the code as it stands. First, you are trying to pass two parameters to your function which only accepts one parameter. Second, the second line of your function is overwriting your $header variable with ... 'css' ...? Have a closer look at that.