My PHP page can receive the same data from two differents pages, the first one send it using GET, and the second with sessions. How can I make this thing work ?
//$var = empty;
//$_GET['id'] = empty;
//User come from page1.php
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$var = $_GET['data'];
}
else {
//User come from page2.php
$var = $_SESSION['data'];
}