I have cobbled together a styleswitcher for my site using sessions and it was working great with php 4.1. However my host upgraded to php 5 and now for some reason the session variable gets reset every time a new page loads. I'm very new to php so if the code I have patched together has glaring problems, please forgive me and point them out.

I'm also using a template system, so hopefully things won't be too confusing. Just want to know why session variables are getting reset.

Here's the code to the template.php page.

PHP Code:
<?php
class Template {
    var 
$Title;
    var 
$Keywords;
    var 
$Content;
    var 
$Header;
    
    function 
Display( ) {
        
session_start();
        if(isset(
$_GET['style'])){
            switch (
$_GET['style']) {
                case 
'green':
                
$stylesheet '<link href="styles/green.css" type="text/css" rel="stylesheet">';
                
$_SESSION['csschanger']=$stylesheet;
                break;
                case 
'blue':
                
$stylesheet '<link href="styles/blue.css" type="text/css" rel="stylesheet">';
                
$_SESSION['csschanger']=$stylesheet;
                break;
                default:
                
$stylesheet '<link href="styles/default.css" type="text/css" rel="stylesheet">';
                
$_SESSION['csschanger']=$stylesheet;
            }
        }
        
$this->DisplayDoctype( );
        echo 
"<html>\n<head>\n";
        
$this->DisplayTitle( );
        
$this->DisplayKeywords( );
        
$this->DisplayStyles( );
        
$this->DisplayScripts( );
        echo 
"</head>\n<body>\n";
        echo 
"<div id=\"main\">\n";
        echo 
"<div id=\"mainstyle\">\n";
        echo 
"<div id=\"topbanner\">\n</div>\n";
        echo 
"<div id=\"leftcontainer\">\n";
        echo 
"<div id=\"themes\">\n";
        echo 
"<div class=\"header\">\n";
        echo 
"<h2>Themes</h2>\n";
        echo 
"</div>\n";
        echo 
"<div id=\"themecontent\" align=\"center\">\n";
        echo 
"<a href=\"" $_SERVER['PHP_SELF'] . "?style=default\" title=\"Red\">\n";
        echo 
"<img border=\"0\" src=\"images/themeR.jpg\" width=\"30\" height=\"30\" alt=\"red\" />\n";
        echo 
"</a>&nbsp;\n<a href=\"" $_SERVER['PHP_SELF'] . "?style=green\" title=\"Green\">\n";
        echo 
"<img border=\"0\" src=\"images/themeG.jpg\" width=\"30\" height=\"30\" alt=\"green\" />\n";
        echo 
"</a>&nbsp;\n<a href=\"" $_SERVER['PHP_SELF'] . "?style=blue\" title=\"Blue\">\n";
        echo 
"<img border=\"0\" src=\"images/themeB.jpg\" width=\"30\" height=\"30\" alt=\"blue\" />\n";
        echo 
"</a>\n</div>\n</div>\n";
        echo 
"<div id=\"navcontainer\">\n";
        echo 
"<div class=\"header\">\n<h2>Navigation</h2>\n</div>\n";
        echo 
"<div id=\"navlist\">\n";
        include (
"includes/menu.html");
        echo 
"</div>\n</div>\n</div>\n";
        echo 
"<div id=\"rightcontainer\">\n";
        echo 
"<div class=\"header\">\n";
        
$this->DisplayHeader( );
        echo 
"</div>\n";
        echo 
"<div id=\"content\">\n";
        echo 
$this->Content;        
        echo 
"</div>\n</div>\n";
        echo 
"<div class=\"clear\">&nbsp;</div>";
        echo 
"</div>\n</div>\n";
        echo 
"\n</body>\n</html>\n";
    }
    
    function 
DisplayDoctype( ) {
        echo 
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n";
    }

    function 
DisplayTitle( ) {
        echo 
"<title>" $this->Title "</title>\n";
    }
    
    function 
DisplayKeywords( ) {
        echo 
'<meta name="keywords" content="' $this->Keywords '">';
    }
    
    function 
DisplayHeader( ) {
        echo 
"<h2>" $this->Header "</h2>";
    }
    
    function 
DisplayStyles( ) { 
        echo (
$_SESSION['csschanger'])? $_SESSION['csschanger']: '<link href="styles/default.css" type="text/css" rel="stylesheet">';
    }

    function 
DisplayScripts( ) {
        echo 
'<script type="text/javascript" src="includes/nav.js"></script>';
    }
    
    function 
SetContent$Data ) {
     
$this->Content $Data;
    }
}
?>
You can see the page in question here. Thanks for any help!