Ok, this is really pissing me off. Here's my code.
Code:
<?php
// ######################### ERROR REPORTING #############################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('GET_EDIT_TEMPLATES', true);
define('THIS_SCRIPT', 'topxadmin');
require_once('./global.php');
require_once('./includes/functions_misc.php');
// ###################### Edit Settings ########################
if ($_GET['act'] == "update")
{
print_cp_header("Top X Control Panel");
$excludedforums=$DB_site->query_first("SELECT excludedforums FROM topx_admin WHERE topx_adminid = '1'");
print_form_header('topxadmin', 'do_update_topxsetting');
print_table_header("Top X Settings");
print_input_row("Forums to exclude", 'exclude_forums',$excludedforums['exclude_forums']);
print_submit_row("Update Top X Settings", 0);
}
if ($_POST['do'] == "do_update_topxsetting")
{
print_cp_header("Top X Control");
$DB_site->query("UPDATE topx_admin SET excludedforums='{$_POST['exclude_forums']}' WHERE topx_adminid = '1'");
define('CP_REDIRECT', 'topxadmin.php?act=update');
print_stop_message('excluded_forums_updated');
}
?>
Now, everything looks right, I don't see any problems, but that might just be me. Please, some one point out a problem and WHY it's wrong, not just how to fix it.
Edit : feel free to AIM me at thumbsup2mrcoffe to help me, or MSN at
thumbsup@gfxhaven.com