Hello,
I’d like to develop a module, a sort of wizard.
I wrote this :
include_once $MLpath."ML.inc.php";
$object=new ML($MLpath);
//I'm coming from manager
if(empty($_POST))
{
$object->populateFields($parentids); //I write some default fields values in the adminpage1 form
$object->AdminPage("1"); //show adminpage1
}
if(isset($_POST['cancel']))
{
$object->populateFields($parentids);
$object->AdminPage("1");
}
//Ok, go to adminpage2
if(isset($_POST['submit']))
{
$object->checkfields();
unset($_POST['submit']);
$object->AdminPage("2");
}
//Ok, go to adminpage3
if(isset($_POST['submit2']))
{
$object->sendML(); //Problem : doesn't remember the results of checkfields !
$object->AdminPage("3");
}
In the admin page method, I "echo " some HTML page, with a form, and the action of the form is :
So, I’m coming back to the module code. But the problem is : the instance $object doesn’t remember what it was appening beforce, it’s something like each time the modules creates another $object. Is there a way to keep the variables of my $object ?