I am hoping one of you can give me a simple solution to this. I've googled and searched this forum, but I didn't seem to fall upon the right answer. Is there a quick way to see if any $GET variables have been set? I can only think of checking the $SERVER['PHP_SELF'] to see if it contains a "?"; Is there a better, cleaner solution? Thanks
foreach($_GET as $Key => $Value) { echo "Key: $Key -- Value: $Value"; $Counter++; }
There would be a few ways but that will show all get vars. What exactly are you wanting to do?
Counter would give you the total Get vars set.
Consider:
<?php if (empty($_GET)) echo 'not set'; else echo 'set'; ?>
Guys, Thanks a million for the quick response. Both suggestions worked perfectly. It turns out that what I wanted to do with that didn't apply, but the information is useful. Thanks I really appreciate it.