8.6 Superglobal Arrays
Superglobal arrays are actually very easy to describe. They are (associative) arrays that contain important information. For example, $_SERVER contains HTTP headers, paths, and so on; $_POST and $_GET contain data from sent forms; and $_SESSION contains information about user sessions. As they are so important, we will briefly introduce them here and refer to the chapters in which they are explained in more detail for the frequently used ones.
But before we get to that, a few general words about superglobal arrays. When PHP 4 was released, it was very easy to access form values in PHP. You could simply use the name of the HTML field as a variable. Before PHP 5.4, it was possible to set the register_globals directive ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access