I am trying to make a simple css type style using a class as was shown in one of the tutorials, but I keep getting the following errors when I attempt to include it in my index file:
Parse error: parse error in c:\program files\apache group\apache\htdocs\harrysite\style1.php on line 18
Fatal error: Cannot instantiate non-existent class: style in c:\program files\apache group\apache\htdocs\harrysite\main.php on line 9
The second error I know is because the class for some reason does not exist, but it should. I have checked the code over and over and still cannot find anything wrong with it. Anyway, enough jibba-jabba, here is the code:
<?php
class style {
var $text;
var $bgcol;
var $alink;
var $vlink;
var $link;
var $td;
var $size;
var $valign;
var $align;
function style ($text="#000000",$bgcol="#FFFFFF",$alink="#000066",$vlink="#6633CC",$link="#6633CC",$td="#FFFFFF",$size=2,$valign="top",$align="left") {
$this->text=$text;
$this->bgcol=$bgcol;
$this->alink=$alink;
$this->vlink=$vlink;
$this->link=$link
$this->td=$td;
$this->size=$size;
$this->valign=$valign;
$this->align=$align;
}
}
?>
I hope someone can help me out here, I would really appreciate it. Thanks.