I took a look at the php and classes tutorial and I am trying to make it so I can modify the text, bgcol, etc using the function "change". Anyway, when I follow the set up the way the tutorial shows me I get the following message:
Fatal error: Call to undefined function: change() in c:\program files\apache group\apache\htdocs\harrysite\header.php on line 3
What I have in the header file is the following code:
<tr>
<?php
function change($varname,$value) {
$this->$varname=$value;
}
$Basic->change("bgcol","#000066");
$Basic->change("text","#FFFFFF");
echo ("hARRYs Site")
?>
</tr>
For some reason I cannot seem to bypass this error when I try placing the new function elsewhere on other includes, etc. What is wrong with this? I am using php4 w/ Apache Web server on Windows machine.
Thanks for your help in advance.