I have the following functions in my install class.
function fstage($stage)
{
include_once($box_path .'install/stages/'. $stage .'.html');
if(isset($_POST['submit']))
{
include_once($box_path .'install/stages/p_'. $stage .'.php');
}
}
function install($paged = null)
{
$page = (isset($paged) ? $paged : (isset($_GET['page']) ? $_GET['page'] : 'database'));
switch($page)
{
case 'database':
$this->fstage('database');
break;
case 'config':
$this->fstage('config');
break;
case 'administration':
$this->fstage('administration');
break;
default:
if(!$this->done_stages())
{
$stage = $this->find_nstage();
$this->fstage($stage);
}
else
{
die('<strong>ERROR 2:</strong> <em>The installation is complete.</em>');
}
break;
}
}
- function fstage($stage)
- {
- include_once($box_path .'install/stages/'. $stage .'.html');
- if(isset($_POST['submit']))
- {
- include_once($box_path .'install/stages/p_'. $stage .'.php');
- }
- }
-
- function install($paged = null)
- {
- $page = (isset($paged) ? $paged : (isset($_GET['page']) ? $_GET['page'] : 'database'));
-
- switch($page)
- {
- case 'database':
- $this->fstage('database');
- break;
- case 'config':
- $this->fstage('config');
- break;
- case 'administration':
- $this->fstage('administration');
- break;
- default:
- if(!$this->done_stages())
- {
- $stage = $this->find_nstage();
- $this->fstage($stage);
- }
- else
- {
- die('<strong>ERROR 2:</strong> <em>The installation is complete.</em>');
- }
- break;
- }
- }
The problem with it, is that it's including the form TWICE!
If you need the whole class then let me know... thanks for the help. I don't really want to have two forms included into my installation.
[EDIT:] include_once did the trick, but I still don't know why it included the form twice the regular way. I'd still like to know why it would do such a thing.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8