// if 'REQUEST_URI' isn't available then ... if(!isset($_SERVER['REQUEST_URI'])) { // ... set my own request url and ... $temp_request_url = $_SERVER['PHP_SELF']; // ... test for and add url variables to my request url ... if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { $temp_request_url .= (strpos($updateGoTo, '?')) ? "&" : "?"; $temp_request_url .= $HTTP_SERVER_VARS['QUERY_STRING']; } } else { // ... otherwise use the regular 'REQUEST_URI' $temp_request_url = $_SERVER['REQUEST_URI']; } Aardvark 08-Mar-2006 05:35 $_GET may not handle query string parameter values which include escaped Unicode values resulting from applying the JavaScript "escape" function to a Unicode string. To handle this the query parameter value can be obtained using a function such as: function getQueryParameter ($strParam) { $aParamList = explode('&', $_SERVER['QUERY_STRING']); $i = 0; while ($i < count($aParamList)) { $aParam = split('=', $aParamList[$i]); if ($strParam == $aParam[0]) { return $aParam[1]; } } return ""; } or by directly building an array or query string values and then processing the parameter string using a function such as the "unescape" function which can be found at http://www.kanolife.com/escape/2006/03/unicode-url-escapes-in-php.html (or http://www.kanolife.com/escape/ for related info). justin dot (nospam)george at gmail dot com 01-Mar-2006 04:00 Note that it's a very, very bad idea to append to global variables in a loop, unless you really, really mean to do so in a global context. I just a while ago hung my server with a snippet of code like this: |