im working with phpBB forums and doing some mods to it. at one point in my code, i need to go from updating one table in the database, to two different tables here is where its submitting the information to the database: (my code is between the // random quote mod) [code]// random quotes mod $sqldata = "SELECT * FROM " . QUOTES_TABLE; if(!$result = $db->sql_query($sqldata)) { message_die(CRITICAL_ERROR, "Could not query quotes information in admin_board", "", __LINE__, __FILE__, $sqldata); } else { while( $row = $db->sql_fetchrow($result) ) { $quotes_name = $row['quotes_name']; $quotes_value = $row['quotes_value']; $default_quotes[$quotes_name] = isset($HTTP_POST_VARS['submit']) ? str_replace("'", "\'", $quotes_value) : $quotes_value; $quotes[$quotes_name] = ( isset($HTTP_POST_VARS[$quotes_name]) ) ? $HTTP_POST_VARS[$quotes_name] : $default_quotes[$quotes_name]; } } // random quotes mod // // Pull all config data // $sql = "SELECT * FROM " . CONFIG_TABLE; if(!$result = $db->sql_query($sql)) { message_die(CRITICAL_ERROR, "Could not query config information in admin_board", "", __LINE__, __FILE__, $sql); } else { while( $row = $db->sql_fetchrow($result) ) { $config_name = $row['config_name']; $config_value = $row['config_value']; $default_config[$config_name] = isset($HTTP_POST_VARS['submit']) ? str_replace("'", "\'", $config_value) : $config_value; $new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name]; if ($config_name == 'cookie_name') { $new['cookie_name'] = str_replace('.', '_', $new['cookie_name']); } // Attempt to prevent a common mistake with this value, // http:// is the protocol and not part of the server name if ($config_name == 'server_name') { $new['server_name'] = str_replace('http://', '', $new['server_name']); } if( isset($HTTP_POST_VARS['submit']) ) { $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '" . str_replace("\'", "''", $new[$config_name]) . "' WHERE config_name = '$config_name'"; //random quotes mod $sqldata = "UPDATE " . QUOTES_TABLE . " SET quotes_value = '" . str_replace("\'", "''", $quotes[$quotes_name]) . "' WHERE quotes_name = '$quotes_name'"; // random quotes mod if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Failed to update general configuration for $config_name", "", __LINE__, __FILE__, $sql); } if( !$db->sql_query($sqldata) ) { message_die(GENERAL_ERROR, "Failed to update random header quotes for $quotes_name", "", __LINE__, __FILE__, $sqldata); } } }[/code] now it is reading the info from the database for the CONFIG_TABLE but when you press submit to update any changed information, it just brings up the old data (it never updates it) theres obviously something wrong with the way ive done this, and i was hoping someone could tell me how to make sure both the CONFIG_TABLE and the QUOTES_TABLE were updated in that one pass. the [code]if( isset($HTTP_POST_VARS['submit']) )[/code] is where it starts to submit to the database