PHP Predefined Variables

PHP_SELF

The current page is: /infost440/a3/predefined.php

REQUEST_METHOD

The request method used to access this page is: GET

Explanation

Predefined variables are variables that PHP automatically gives to a program. They contain useful information about the server, request, user, and environment. They are available without needing to create them first. For example, PHP_SELF contains the current script name, while REQUEST_METHOD shows how the page was requested, such as through GET or POST.