Thank you Chris for you help in this!! Here is my siteHeader.php file:
<?php
include ‘startSession.php’;
$urlParts = explode(‘.’, $_SERVER[‘HTTP_HOST’]);
$subDomain = $urlParts[0];
$_SESSION[‘subDomain’] = $subDomain;
// Get variables from URL
$x = $_REQUEST[‘x’];
$guide = $_REQUEST[‘guide’];
$source = $_REQUEST[‘source’];
$fbID = $_REQUEST[‘fb_ref’];
// Store the Facebook referring ID if one exists
if (isset($fbID)) {
$_SESSION['fbID'] = $fbID;
}
// Grab variables out of the session
$uID = $_SESSION[‘uID’];
$subscription = $_SESSION[‘subscription’];
$personalPosts = $_SESSION[‘personalPosts’];
$memberType = $_SESSION[‘memberType’];
$tempLoginID = $_SESSION[‘tempLoginID’]; // So register won’t show to newly registered people
$guideID = $_SESSION[‘guideID’];
$guideCompany = $_SESSION[‘guideCompany’];
$guideURL = $_SESSION[‘guideURL’];
$guideFirstName = $_SESSION[‘guideFirstName’];
$guideLastName = $_SESSION[‘guideLastName’];
$guidePhone = $_SESSION[‘guidePhone’];
$guideEmail = $_SESSION[‘guideEmail’];
$guideReferral = $_SESSION[‘guideReferral’];
$guideSubscription = $_SESSION[‘guideSubscription’];
// Do we show them advertising?
if (!$memberType && $guideSubscription != “Gold”) {
$showAds = "Yes";
}
if (!$guideID && !$subscription) {
$showAds = "Yes";
}
if ($uID && ($subscription == “Free” || !$subscription) ) {
$showAds = "Yes";
}
// Count the number of testimonials and users
if (!isset($totalPosts)) {
$countTestimonials = “select count(*) as total from testimonies”;
$result = mysql_query($countTestimonials) or die(mysql_error());
$row = mysql_fetch_assoc($result);
$totalPosts = $row[‘total’];
$totalPosts = number_format($totalPosts);
$_SESSION[‘totalPosts’] = $totalPosts;
}
if (!isset($totalUsers)) {
$countUsers = “select count(*) as total from users”;
$result = mysql_query($countUsers) or die(mysql_error());
$row = mysql_fetch_assoc($result);
$totalUsers = $row[‘total’];
$totalUsers = number_format($totalUsers);
$_SESSION[‘totalUsers’] = $totalUsers;
}
// How did they find the website?
$referURL = $_SERVER[‘HTTP_REFERER’];
if ($referURL) {
if (!isset($_SESSION['referrer'])) {
$_SESSION['referrer'] = $referURL;
}
}
if ($guideReferral == “Invite Referral”) {
$_SESSION['referrer'] = "Invite Referral";
}
if ($guideReferral == “Testimonial Referral”) {
$_SESSION['referrer'] = "Testimonial Referral";
}
// Lookup guide if sponsor is used in the URL
if (isset($sponsor)) {
$locateID = "SELECT uID from users where uID = $guide limit 1";
$result = mysql_query($locateID) or die(mysql_error());
$row = mysql_fetch_assoc($result);
$uID = $row['uID'];
$_SESSION['guideID'] = $uID;
}
// Lookup guide if source is used in the URL
if (isset($source)) {
$locateID = “SELECT uID from users where uID = $source limit 1”;
$result = mysql_query($locateID) or die(mysql_error());
$row = mysql_fetch_assoc($result);
$uID = $row[‘uID’];
$_SESSION[‘guideID’] = $uID;
}
// Lookup the guide if an x or fb_ref is in the URL. Don’t user their uID anymore, just YL number
if (isset($x)) {
$lookupGuide = "SELECT uID, companyName, companyURL, firstname, lastname, email, phone, membernumber, subscription from users where membernumber = '$x' limit 1";
}
if (isset($fbID)) {
$lookupGuide = "SELECT uID, companyName, companyURL, firstname, lastname, email, phone, membernumber, subscription from users where membernumber = '$fbID' limit 1";
}
if (isset($x) || (isset($fbID))) {
$result = mysql_query($lookupGuide) OR die(mysql_error());
if ($row = mysql_fetch_array($result)) {
do {
$_SESSION['guideID'] = $row['uID'];
$_SESSION['guideFirstName'] = $row["firstname"];
$_SESSION['guideLastName'] = $row["lastname"];
$_SESSION['guideEmail'] = $row["email"];
$_SESSION['guidePhone'] = $row["phone"];
$_SESSION['guideCompanyName'] = $row["companyName"];
$_SESSION['guideCompanyURL'] = $row["companyURL"];
$_SESSION['guideMemberNumber'] = $row["membernumber"];
$_SESSION['guideSubscription'] = $row["subscription"];
} while($row = mysql_fetch_array($result));
} // end if results
} // end if (isset($x) || (isset($fbID)))
// Start the html for the page
print ("<!DOCTYPE html PUBLIC ‘-//W3C//DTD XHTML 1.0 Strict//EN’ ‘http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd’>
“);
print (”<html xmlns=‘http://www.w3.org/1999/xhtml’ lang=‘en-us’>
");
print ("<head>
");
print (“<title>”);
if ($title) {
$title = htmlentities($title, ENT_QUOTES);
print ("$title");
}
else {
print ("Essential Oils & Aromatherapy Testimonials");
}
print ("</title>
");
print ("<meta http-equiv=‘classification’ content=‘Essential Oils’ />
“);
print (”<meta http-equiv=‘content-type’ content=‘text/html;charset=UTF-8’ />
“);
print (”<meta name=‘keywords’ content=‘essential oils, aromatherapy testimonials, essential oil’ />
“);
print (”<meta name=‘google-site-verification’ content=‘x-Z0TUunm2aSgxhwwyLgnWVCgoyhSGITjfF-V5z6M_k’ />
");
if ($metaDescription) {
$metaDescription = htmlentities($metaDescription, ENT_QUOTES);
print ("<meta name='description' content='$metaDescription' /> \
");
}
else {
$metaDescription = "Essential oils contain healing properties. Come read how others are using them on a daily basis to achieve health and well being. Share what you know, and learn what you don't.";
$metaDescription = htmlentities($metaDescription, ENT_QUOTES);
print ("<meta name='description' content='$metaDescription' /> \
");
}
// Tags for Facebook when a testimonial is being viewed
if ($testimonyFirstName) {
print ("<meta property='og:title' content='$title' /> \
“);
print (”<meta property=‘og:author’ content=‘$testimonialFirstName $testimonialLastName’ />
“);
print (”<meta property=‘og:type’ content=‘article’ />
“);
print (”<meta property=‘og:url’ content=‘$canonical’ />
“);
print (”<meta property=‘og:image’ content=‘http://www.oil-testimonials.com/images/facebook.jpg’ />
“);
print (”<meta property=‘og:site_name’ content=‘Oil-Testimonials.com’ />
“);
print (”<meta property=‘og:description’ content=‘$metaDescription’ />
");
}
if ($mainPage == “Yes”) {
print ("<link rel='canonical' href='http://www.oil-testimonials.com' /> \
");
}
?>
<link rel='image_src' href='http://www.essentialoilshoppe.com/images/oil%20bottle.jpg' />
<link rel='stylesheet' id='theme-reset-css' href='css/reset.css' type='text/css' media='all' />
<link rel='stylesheet' id='theme-style-all-css' href='css/style.css' type='text/css' media='all' />
<link rel='stylesheet' id='prettyPhoto-css' href='css/prettyPhoto.css' type='text/css' media='screen' />
<link rel='stylesheet' id='jquery-popeye-style-css' href='css/jquery.popeye.style.css' type='text/css' media='all' />
<link rel='stylesheet' id='jquery-popeye-css' href='css/jquery.popeye.css' type='text/css' media='all' />
<link rel='stylesheet' id='jquery-colortip-css' href='css/colortip-1.0-jquery.css' type='text/css' media='all' />
<link rel='stylesheet' id='nivo-slider-css' href='css/nivo-slider.css' type='text/css' media='all' />
<!--[if IE 7]>
<link rel='stylesheet' id='theme-ie7-css' href='css/ie7.css' type='text/css' media='screen' />
<![endif]-->
<!--[if lte IE 8]>
<link rel='stylesheet' id='theme-lte8-css' href='css/ie.css' type='text/css' media='screen' />
<![endif]-->
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'></script>
<script type='text/javascript' src='js/jquery.easing.1.3.js'></script>
<script type='text/javascript' src='js/jquery.cycle.all.min.js'></script>
<script type='text/javascript' src='js/jquery.tools.min.js'></script>
<script type='text/javascript' src='js/jquery.prettyPhoto.js'></script>
<script type='text/javascript' src='js/menu_min.js'></script>
<script type='text/javascript' src='js/colortip-1.0-jquery.js'></script>
<script type='text/javascript' src='js/jquery.popeye-2.0.4.min.js'></script>
<script type='text/javascript' src='js/jquery.validate.js'></script>
<script type='text/javascript' src='js/jquery.form.js'></script>
<script type='text/javascript' src='js/jquery.tweet.js'></script>
<script type='text/javascript' src='js/jflickrfeed.min.js'></script>
<script type='text/javascript' src='js/jquery.nivo.slider.pack.js'></script>
<script type='text/javascript' src='js/script.js'></script>
<!--For the lightbbox-->
<?php
//<script type='text/javascript' src='javaScripts/prototype.js'></script>
?>
<script type='text/javascript' src='javaScripts/lightbox.js'></script>
<!--For the row hiliter-->
<script type='text/javascript' src='javaScripts/rowHighlighter.js'></script>
</head>
<!-- google analytics –>
<script type=“text/javascript”>
var _gaq = _gaq || ;
_gaq.push([‘_setAccount’, ‘UA-30483100-1’]);
_gaq.push([‘_trackPageview’]);
(function() {
var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<body class=“green-skin”>
<!-- container –>
<div id=“container”>
<!-- background holder -->
<div class="background_pic_border">
<!-- background image -->
<div class="background_pic_holder">
<img src="images/assets/background.jpg" width="100%" alt="lavender fields for essential oils" />
</div>
<!-- background curv graphic -->
<div class="back-curv"></div>
</div>
<!-- end div .background image -->
<!-- wrapper -->
<div id="wrapper">