Lately I've become aware that not all servers have register_globals on and have been trying to make do without it. Everything's ok so far, except this. To avoid using ampersands in my query strings, I use semicolons instead. Then I use parse_str() to convert the query string and read the vars properly:
parse_str(str_replace(';', '&', getenv('QUERY_STRING')));
But I just noticed that parse_str only affects the global variables, it doesn't affect the contents of arrays like $HTTP_GET_VARS. Any suggestions?
One possibility I've thought of is that parse_str() sets the global variables regardless of the setting of register_globals, in which case one could just always use parse_str and forget about the whole register_globals issue entirely. 🙂