Okay im not a complete newb when it comes to php, i can at least attempt to find my way out of dark cave. but i have just started in to learning how to use arrays and if statments to call other pages. before i started using arrays it always relied on a unsecure if statement. and in my attempts to get it to work more securley i screwed up somewere
this is the code that calls other pages
PHP Code:
$function = $_GET['function'];
$page = $_GET['p'];
$do = $_GET['do'];
$do_arrary = array(
'login' => '/scripts/login.php',
'signup' => 'scripts/signup.php',
'logout' => 'scripts/logout.php',
'recover_pass' => 'scripts/recoverpass.php',
'change_pass' => 'scripts/changeuserpass.php',
);
$actions = array(
'empty' => '',
'blank' => 'pages/home.php',
'pak' => 'pages/pak.php',
'about' => 'pages/about.php',
'contact' => 'pages/contact.php',
'news' => 'pages/news.php',
'contact' => 'pages/contact.php',
);
if ($function == "offline") {
echo "<center><h1>Sorry Function Not Avalible Yet</h1></center>";
exit;
}
if($do || array_key_exists($do, $do_array)){
include($do_array[ $do ]);
$do_action = '1';
}
else{
$do_action = '0';
}
if($do_action == 0){
if(!isset($page) || !array_key_exists($page, $actions)) {
// $HTTP_GET_VARS['page'] = 'blank'; // set a default
$page = 'blank';
include($actions[ $page ]);
}
else{
include($actions[ $page ]);
}
}
Whats happing is that the $do_array for some reason is not yeilding the pages im looking for. and when ever that array is parsed it says that there are no pages to be found for inclusion. 
__________________
AMW_Drizz
Dev Machine:: Apache 2.2.6 PHP 5.2.6 MySQL 5.1
|