Please help me i'm really stuck (or i'm stupid), behold the following code:
/----------------begin--index.php-------------------------/
<?
if(!$action){
//new instance from class contract
$co=new contract('new');
//calling method, a form which will be submitted to index.php,
//same page
$co->form('new');
}
else{
//calling method to show members
$co->show();
//this error will now be generated:
//Fatal error: Call to a member function on a
//non-object in /home/domains/sis/sis/lib/test_file.php on line 12
}
?>
/----------------end--index.php-------------------------/
What happened? I didn't use 'unset' or something like that, or is the object destroyed after submitting the form?