changing includes based on user input
Posted: Wed Jul 02, 2003 11:26 am
I would like to change the configuration file to select different databases based on user input. I cannot get the variables from the previous page to show up on this page. This code below is the header, I have a form page that has checkboxes with the name db. I send the values to this script but they do not work.....any help?
Code: Select all
global $db;
if ($db=='1') {
$now='iware_config.php'; }
elseif ($db=='2') {
$now='iware_config2.php'; }
else ($db=='3') {
$now='iware_config3.php'; }
if(isset($ModLoader) && $ModLoader==1)
{
include "../../admin/iware_config.php";
include "../../admin/gui.php";
}
else
{
if(isset($ClientLoader) && $ClientLoader==1)
{
include "admin/iware_config.php";
include "admin/gui.php";
}
else
{
include "$now";
include "gui.php";
}
}