PHP Predefined Variables

Server Name: hajarali.soisweb.uwm.edu

Request Method: GET

What Each Variable Means

$_SERVER['SERVER_NAME']: Shows the name of the server hosting the webpage.

$_SERVER['REQUEST_METHOD']: Shows the request method used to access the page, such as GET or POST.

Explanation

Predefined variables are variables that PHP automatically provides for us. They contain information about the server, browser request, forms, and other parts of the webpage. We do not have to create these variables ourselves. They are useful because PHP automatically stores information in them that our program can access when needed.

Back to Activity 3