public static function addLocalizationRecord() { $newRow = array(); foreach ($_POST as $key => $value) { $text = Core::validate($value); if ($text == null) { return; } if ($key != 'EN') { $newRow[$key] = urlencode($text); } else { $newRow[$key] = $text; } } Localization::insert($newRow); header("Location: /admin/localization"); }