If you are learning PHP right now at this moment then a good free source is an online book called Practical PHP Programming which there is a link to the most updated version provided at that link, but I think that what is at that link will guide you up to PHP 5 anyway with a few refinements in the other link provided at that site.
I have this site as a point of reference and so should you, then you might also want to read the manual to understand why register_globals should be turned OFF since there are nasty things that could happen with them turned on.
I do appreciate that the code you showed also did not use the short tags which you might also see see below:
<?
//using short tag PHP
phpinfo():
?>
Using proper PHP tags in call code now days is as below
<?php
//using long tags for PHP vice xml or others
phpinfo();
?>
Welcome to PHP and hope you have few problems but there are many here to help you on your way...just ask when you encounter problems and there are experts here to help.
Also as a side bar please edit your POST so that it is displayed by enclosing your PHP code and in the future use it also to post your PHP...it is simple just look at the first link in my signature to see how to do so while composing a message or editing a POST you have already done.