print_r($_GET); PHP: ..and you'll see Undefined variables in PHP can be NULL, false, 0, '', or Array(). == false returns always true on any of them, so this is an easy way to check for any undefined or empty variables. Use isset() if you just want to check whether a variable has been initialized.
Just in case you want to read "john" from that URL (without any id), you can use this <?php $name = $_SERVER['QUERY_STRING']; ?> PHP:
<?php if(isset($_GET['john')) { echo "Welcome john :D"; } else { echo "Hey you're not john!"; } ?> PHP: