I have two files say file1.php and file2.php. I have one php file named form in which class form has been defined. I have created an object in file1.php as follow:
require_once('form.php');
$x=$_GET['field'];
$form = new Form("", "");
$personal = new Block("");
$address = new TextArea("address", $x, "", 3, 30);
$personal->add($address);
$form->add($personal);
echo $form;
now i want to use this object $form and $personal in another file file2.php which is as follow:
$personal = new Block("");
$name = new Text("name",$x);
$personal->add($name);
$form->add($personal);
echo $form;
how can i use these objects in php. please help.