PHP Detect if any URL variables have been set

php

Solution

I would test for `QUERY_STRING`:

if (!empty($_SERVER["QUERY_STRING"]))

should in effect be no different from checking `$_GET`, though - either way is fine.

Problem

Hey guys, it's kind of hard to explain but basically I want to detect if any variables have been set through the URL. So with my IF statement all of the following should return true: - http://domain.com/index.php?m=100 - http://domain.com/index.php?q=harhar - http://domain.com/index.php?variable=poo&crazy=yes and all the following return false: - http://domain.com/index.php - http://domain.com/test.php - http://domain.com/no_variables.php Any ideas?

Original source