Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

modules.php has stopped updating the configuration table


johnniefp

Recommended Posts

Posted

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...