Here's something I learnt a while back, about how to detect if there is a ?foo after the page URL, even if that GET request is empty (without the =bar) bit. Try it on my "Random Post" button, you will find it adds a ?r after the post URL you are sent to, so the page knows to add an ID that makes the button highlighted.
So, to detect it:
if (isset($_GET['foo'])) echo('Yeah, foo is set');This would work on something like http://www.example.com/index.php?foo, and avoids an unnecessary ?foo=yes or something to indicate that foo is true. Neat and tidy :-)
well the if condition based on isset($_GET['var']) works fine with echo etc... but the problem arises when u try to use the get variable inside the if condition in something like.... if(isset($_GET['var'])) { $var2=$_GET['var']; } else { $var2=$var3; } searched a lot on google and found many people having this problem ..