i had a problem while creating a objects..
i usually create the objects at the top of the index.php page and all other files are included in the index.php page..
suppose i create a object say :
Code: Select all
$obj1 = new MyClass();Code: Select all
if(isset($_POST['SUBMIT'])){
global $obj1;
$obj1->save();
}Any idea avoid this situation of making global in case of if(), while() etc conditions
Awaiting for your great help
Thanks in advance to all of you