Ok - I'm having a brain fart.
Within one script, I have created an object from one class ($this->main).
I am calling another class ($this->newProjectForm) and I want to be able to access all of the contents and functionality of $this->main within the object $this->newProjectForm)
example code:
<?php
include once "class.main.php";
include_once "class.newProjectForm.php";
$this->main = new main();
$newProjectForm = new newProjectForm();
?>
I tried passing $this->main to newProjectForm as follows:
$newProjectForm = new newProjectForm($this->main);
And within the newProjectForm class, doing the following
class newProjectForm {
var $main;
function __construct($main_passed)
{
$this->main = $main_passed;
}
}
But had no luck.
Where am I going wrong here?
Thanks in advance,
-=Lazz=-