Type-1
Local variable or user defined variable.
Syntax- $VARIABLE_NAME
Ex - $demo, $cust_name,$pic1 etc
Type-2
Global variables or pre-defined variables
a) $GLOBAL => To create a php global variable.
b) $_POST => To access value from a HTML form using 'post' method.
c) $_GET => To access value from a HTML form using 'get' method.
d) $_REQUEST => To access value from a HTML form using any method.
e) $_SERVER => To get data related to server.
f) $_SESSION => To create session storage.
g) $_COOKIE => To create a local storage.
h) $_ENV => To get or update data in PHP environment.
i. $_FILES => To access file details from a HTML form and upload to the server.
Top comments (0)