If you look at the code that actually uses $_SERVER['PHP_SELF'], you'll notice the there's a very important keyword missing...
echo
You never actually output the value of PHP_SELF to the client, so the name is missing from the form.
Also, as Snib mentioned, you should use $_POST to access form data submitted via a POST form. You access these variables using their global names (e.g. $first), which don't exist if register_globals is off, and via $_GET, which doesn't exist because your form submits via POST.
That said, you should clean up your code. For example:
if (!isset($first))
should be
if (!isset($_POST['first']))
And
echo "Thank you, ". $_GET['$first'.' $last'];
Should actually be
echo "Thank you, " . $_POST['$first'] . $_POST['$last'];
Notice in this last example you had concatenated two strings to create a single array index, when what you intended to do was concatenate the values stored at two different array indexes.
Take a minute to reread your original version. PHP would concatenate the strings and create this:
echo "Thank you, ". $_GET['$first $last'];
Can you see why this is incorrect? You want to access the index 'first' of the array. Here, 'first' and 'last' are not variables, they're just indexes into an array. The value is accessed via the array variable, which is why $_GET has a dollar-sign in front of it. $_GET is the variable, an array. 'first' and 'last' are indexes into that array.
If my change does not make sense, let me know and I'll go into more detail.
Take care,
Nik
http://www.bigaction.org/