urldecode the db name if (isset($lightm_db)) { $db = urldecode($lightm_db); unset($lightm_db); } $url_query = 'lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server . (empty($db) ? '' : '&db=' . urlencode($db)); header('Content-Type: text/html; charset=' . $GLOBALS['charset']); ?>