PHP POST Variables

PHP Global Variables tutorial will explains you How to use PHP Global Variables? with examples & Syntax.

Some predefined variables in PHP are “superglobals”, which implies that they are dependably approachable, paying little mind to extension – and you can access them from any function, class or file without needing to do anything special.

List of Global Variables in PHP


PHP $GLOBAL is super global variable which is utilized to enter global variables from anyplace in the PHP script.

Example on PHP $GLOBAL


PHP $_SERVER is a super global variable which holds data about headers, paths, and script areas.

Example on PHP $_SERVER


PHP $_REQUEST is used to collect data after submitting an HTML form

Example on PHP $_REQUEST


Most forms use the POST method because it “hides” form data from user since it doesn’t get attached with the URL in the address bar. This data is collected using $_POST variable (which is in array format) in php script

Example on $_POST




PHP GET method sends its variables through web browsers URL, which makes it visible and possibly change the information that was sent.




An associative array of items uploaded to the current script via the HTTP POST method.



An associative array of variables passed to the current script via the environment method

Example on $_ENV


PHP Cookie is usually a small piece of data sent from a website and stored in an user’s web browser while an user is browsing a website. One simple route to maintain data between the diverse pages in a web application is with PHP cookies.


PHP Session allows an application to store information for the current “session”.

Previous articlePHP GET Variable
Next articlePHP Constants
I am a young Information Systems Security Engineer(CEH). I had started with penetration testing when i am 17 years old. It all started with Kali linux and Metasploit.In free time i will play with Security holes/Bug bounty/Pentesting and Hacking !!!