I use predefined variables to get information that PHP already provides for me. I do not have to create these variables myself. In my examples, SERVER_NAME tells me the name of the server. PHP_SELF tells me the name and path of the PHP page that is currently running.