Title: $_GET and $_SERVER[&#039;QUERY_STRING&#039;] not working
Last modified: August 31, 2016

---

# $_GET and $_SERVER['QUERY_STRING'] not working

 *  [sabuhiy](https://wordpress.org/support/users/sabuhiy/)
 * (@sabuhiy)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/_get-and-_serverquery_string-not-working/)
 * We recently switched to a new server and the code below that I used to grab GA
   _utmz values doesn’t work anymore. I also tried $_SERVER[‘QUERY_STRING’] and 
   I get nothing.
 *     ```
       if ( isset($_GET['utm_medium']) ) {
         	$medium   = $_GET['utm_medium'];
       }
       ```
   
 * I was just wondering if it is due to the PHP version installed on the server.
   Any insight is appreciated. Btw, the code runs fine on my localserver.
 * Thanks!

Viewing 1 replies (of 1 total)

 *  [cedcommerce](https://wordpress.org/support/users/cedcommerce/)
 * (@cedcommerce)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/_get-and-_serverquery_string-not-working/#post-7448908)
 * Hello sabuhiy,
 * Yes php version can be a problem for this kind of error as the register_globals
   feature, which automatically put form fields in regular variable scope and initialized
   with expected values is deprecated DEPRECATED as of PHP 5.3.0 and REMOVED as 
   of PHP 5.4.0, you can check more about this [ Here ](http://php.net/manual/en/security.globals.php),
 * Hope this will help you.

Viewing 1 replies (of 1 total)

The topic ‘$_GET and $_SERVER['QUERY_STRING'] not working’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [cedcommerce](https://wordpress.org/support/users/cedcommerce/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/_get-and-_serverquery_string-not-working/#post-7448908)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
