There are many predefined variables in PHP which are "superglobals", that denotes they are always
accessible, regardless of scope.
and you can access them according to your need from any function.
So, there are 5 main superglobal variables in php
These are following:
- $GLOBALS:-This is a PHP super global variable which is utilized to access global variables from anywhere additionally from within functions or methods.
- $_SERVER:-This is a another PHP super ecumenical variable that is holds information related headers, paths, and script locations.
- $_REQUEST:-$_REQUEST:-$_REQUEST is basically used for collecting data after submitting an HTML form.
- $_POST:-$_POST is basically used to accumulate form data after submitting an HTML form .
- _GET:-PHP $_GET can also be used to collect form data after submitting an HTML form with method="get".
0 Comment(s)