i have created the following class to create the meta tags for my web pages. basicly i want it to create standard meta tags unless i overwrite it with other information.
it creates the meta tags ok but doesn't enter the default values.
i would appreciate any help as it is the first class i have written.
class metaClass
{
var $Abstract;
var $Author;
var $Content_Language;
var $Copyright;
var $Description;
var $Distribution;
var $Keywords;
var $Robots;
var $RefreshTime;
var $RefreshURL;
var $varname;
var $value;
function StandardMeta($Abstract="asdfsdfa", $Author="asfdas", $Content_Language="en", $Copyright="dafasdf", $Distribution="global", $Keywords="sdfsadf", $Robots="index, follow", $RefreshTime="", $RefreshURL="")
{
$this->Abstract=$Abstract;
$this->Author=$Author;
$this->Content_Language=$Content_Language;
$this->Copyright=$Copyright;
$this->Description=$Description;
$this->Distribution=$Distribution;
$this->Keywords=$Keywords;
$this->Robots=$Robots;
$this->RefreshTime=$RefreshTime;
$this->RefreshURL=$RefreshURL;
}
function Set($varname,$value)
{
$this->$varname=$value;
}
function Make()
{
print "\n<META Name=\"Abstract\" Content=\"$this->Abstract\">\n";
print "<META Name=\"Author\" Content=\"$this->Author\">\n";
print "<META HTTP-EQUIV=\"Content-Language\" Content=\"$this->Content_Language\">\n";
print "<META Name=\"Copyright\" Content=\"$this->Copyright\">\n";
print "<META Name=\"Description\" Content=\"$this->Description\">\n";
print "<META Name=\"Distribution\" Content=\"$this->Distribution\">\n";
print "<META Name=\"Keywords\" Content=\"$this->Keywords\">\n";
print "<META Name=\"Robots\" Content=\"$this->Robots\">\n";
print "<META HTTP-EQUIV=\"Refresh\" content=\"$this->RefreshTime;URL=$this->RefreshURL\">\n";
}
}
then i include it with the following code
include "classfile.php";
$meta = new metaClass;
$meta->StandardMeta;
$meta->Make();
thanks in advance,
Anthony Irwin