Here is my header code so far:
Code: Select all
<html>
<head>
<title><?php echo "name goes here";?></title>
</head>
<h1><center><font face="Trebuchet MS"><?php echo "name goes here"; ?></font></center></h1>
<hr>
<br>
</html>Moderator: General Moderators
Code: Select all
<html>
<head>
<title><?php echo "name goes here";?></title>
</head>
<h1><center><font face="Trebuchet MS"><?php echo "name goes here"; ?></font></center></h1>
<hr>
<br>
</html>Code: Select all
<html>
<head>
<title>Code: Select all
</title>
</head>Code: Select all
<h1><center><font face="Trebuchet MS">Code: Select all
</font></center></h1>
<hr>
<br>
</html>Code: Select all
<?PHP
include("header1.html");
echo $yourvariable;
include("header2.html");Code: Select all
<?PHP
include("header3.html");
echo $yourvariable;
include("header4.html");
?>Code: Select all
<?PHP
$header1 = "<html><head><title>";
$header2 = "</title></head>";
$header3 = "<h1><center><font face='Trebuchet MS'>"; //code between "" can't contain again " ", so you have to use '.
$header4 = "</font></center></h1><hr><br></html>";
$yourvariable = "Untitled";
?>
Code: Select all
<?PHP
include("vartext.php"); //this should before all code.
echo $header1;
echo $yourvariable; //you can add more variables to vartext.php and in each page just change this variable name. i hope you understand.
echo $header2;
echo $header3;
echo $yourvariable;
echo $header4;
?>
Code: Select all
<?php
$header1 = "<html><head><title>";
$header2 = "</title></head><h1><center><font face='Trebuchet MS'>";
$header3 = "</font></center></h1><hr><br></html>";
?>
Code: Select all
include("header.php");
echo $header1."Question".$header2."Question".$header3;Hm, I don't know if this way it is going to work. Does it?lmg wrote:Code: Select all
include("header.php"); echo $header1."Question".$header2."Question".$header3;
Code: Select all
include("header.php");
$name="Login";
echo $header1.$name.$header2.$name.$header3;Code: Select all
<?php
$Title = "Your Title";
$MetaKeywords = "Keywords,Go,Here";
$MetaDescription = "Page Description";
// Include Header
include("header.php");
?>
<!-- Content goes here -->
<?php
// Include Footer
include("footer.php");
?>
Code: Select all
<html>
<head>
<title><?php echo $Title;?></title>
<meta name="keywords" content="<?php echo $MetaKeywords; ?>" />
<meta name="description" content="<?php echo $MetaDescription; ?>" />
</head>
<h1><center><font face="Trebuchet MS"><?php echo $Title; ?></font></center></h1>
<hr>
<br>
Code: Select all
</body>
Code: Select all
function newPage($title, $description, $keywords) {
$pagetitle = $title;
$pagedescription = $description;
$pagekeywords = $keywords;
include 'header.php';
}
Code: Select all
<title><?php echo $pagetitle; ?></title>
Code: Select all
newPage("My home page", "description of page goes here", "page, keywords, go, here");