Forum Moderators: coopster
I have this function which should check whether the URL contains a query string and if so print it:
<?php
if (!is_null($_SERVER['QUERY_STRING'])) {
print ($_SERVER['QUERY_STRING']);
}
?>
Now if there IS a query string, it qorks perfectly. If there is none, though, I get a notice telling me
Undefined index: QUERY_STRING in path\to\my_page.php on line xx.
How can I get rid of that?