johnniefp Posted September 25, 2006 Posted September 25, 2006 Evening All. My modules.php file has stopped updating the database? modules.php approx line 43 if (tep_not_null($action)) { switch ($action) { case 'save': while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'"); } tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module'])); break; Anything within the while loop is not working. I have substituted my while() loop with. foreach($HTTP_POST_VARS['configuration'] as $key => $value) { $jfpSql = "update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'"; $res = tep_db_query($jfpSql); } The foreach loop I have replaced the while() loop with works fine? I'm baffled. Anyone have clues?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.