PHP Predefined Variables

Example 1: $_SERVER

Server name: obrknez.soisweb.uwm.edu

Example 2: $_GET

No name was entered in the URL.

Explanation

Predefined variables are variables that PHP automatically makes available to a programmer. They can provide information about the server, browser request, forms, cookies, sessions, and other information. The $_SERVER variable contains server and request information, while $_GET contains information sent through parameters in the webpage URL.

What Each Variable Means

$_SERVER: Contains information about the web server and the current page request.

$_GET: Contains information that has been sent to a PHP page through the URL.

Back to Index