Predefined Variables in PHP

In all PHP scripts, a set of predefined variables is available to you. You might have seen some of these variables in the output of the phpinfo() function, if you scrolled and read through the entire results page. Some of these predefined variables are called superglobals, meaning that they are always present and available to all of your scripts, without any intervention by you, the programmer.
Please study the following list of superglobals, because they will be used extensively throughout this book. Each of these superglobals is actually an array of other variables. Don’t worry about fully understanding this concept now, because it will be explained as you move along through the book.
  •  $_GET contains any variables provided to a script through the GET method. 
  •  $_POST contains any variables provided to a script through the POST method.
  •  $_COOKIE contains any variables provided to a script through a cookie. 
  •  $_FILES contains any variables provided to a script through file uploads. 
  •  $_ENV contains any variables provided to a script as part of the server environment. 
  •  $_SESSION contains any variables that are registered in a session.

About the author

Being the CEO and Founder of ClecoTech International, Mr. Ashish Prajapati is dedicated towards his aim of mentoring young startups into a full-fledged businesses. He is helping startups from America, Europe, India, and various other countries through proper guidance and the use of latest technologies to develop their innovation and ideas into definite realities.

Leave a Reply

Your email address will not be published.