ways to data transfer in php

PHP is server script Language design for the web development. but also used the as a general purpose programming language. PHP development began in 1994.
 
From where is the data derived? Is the data stored in a database or just the content of a webpage? If it's a database you can just recall the data.

How much data do you need to transfer? Small amounts can be stored in a cookie.
 
$_GET

Pass the data in the form of url page.php?variable=value and read the values as `echo $_GET['variable']

$_POST

Pass the data using <form method="POST">...</form> and read the values as echo $_POST['variable']

$_SESSION

Start the session session_start();
Declare a variable $_SESSION['variable'] = "value";
Read the value echo $_SESSION['variable'];
$_SERVER

Declare a variable $_SERVER['variable'] = "value
 
Back
Top