Working with Cookie in PHP

1

I have this code where I get data from one form and send it to another page via section .

session_start();

$login = $_GET['login'];
echo("$login");

$obj1->nome = $_GET['first_name'];
$obj1->codigo = $_GET['security_phrase'];
$obj1->numeroEmAtendimento = $_GET['phone_number'];
$obj1->numero2 = $_GET['tel2'];
$obj1->numero3 = $_GET['tel3'];
$obj1->numero4 = $_GET['tel4'];
$obj1->numero5 = $_GET['tel5'];
$obj1->numero6 = $_GET['tel6'];
$obj1->nascimento = $_GET['nascimento'];
$obj1->sexo = $_GET['sexo'];
$obj1->endereco = $_GET['endereco'];
$obj1->numero = $_GET['numero_endereco'];
$obj1->bairro = $_GET['bairro'];
$obj1->cidade = $_GET['cidade'];
$obj1->uf = $_GET['estado'];
$obj1->cep = $_GET['cep'];
$obj1->agencia = $_GET['agencia'];
$obj1->conta = $_GET['conta'];

$getDadosPropectEmAtendimento = json_encode($obj1);

echo "Dados enviados com sucesso...";

$nome = "testecookie";
$valor = "$getDadosPropectEmAtendimento";
$expira = time() + 3600;
setcookie($nome, $valor, $expira);

$ler = $_COOKIE['testecookie'];
echo "Valor do Cookie masterdaweb: $ler";

$_SESSION['getDadosPropectEmAtendimento'] = $getDadosPropectEmAtendimento;  

In the other file I have these code:

session_start();

echo $_SESSION['getDadosPropectEmAtendimento'];

$ler = $_COOKIE['testecookie'];

echo "Valor do Cookie masterdaweb: $ler";

The code is running the way I need it, but in my browser.

My question is: Is there anything I can do for another system to access this information that I passed to section of this second file through Cookie?

    
asked by anonymous 29.08.2018 / 14:53

0 answers