1
I have the following code in the file config.php:
<?php
if(session_status() != PHP_SESSION_ACTIVE )
{
session_start();
}
$_SESSION['id_sessao'] = session_id();
...
It turns out that when I send the login form to insert another data in the session that in that case would be $_SESSION['login']
, this does not occur.
The login page looks like this:
<?php
require_once 'config.php';
...
$login = $_REQUEST['login'];
$_SESSION['login'] = $login;
...
Would you please help me?
How did you verify that "it doesn’t work"? You guaranteed that the form value would get correctly to PHP?
– Woss
Yes. I used var_dump($_SESSION); and there I found the value of session_id();
– Danilson Veloso de Sousa
Only my variable doesn’t go there. I tested it on localhost and it’s ok, but when I try it online it doesn’t work.
– Danilson Veloso de Sousa
The form is submitted via jQuery ajax and I have response from the login.php page in . json format.
– Danilson Veloso de Sousa