Why does not the PHP session work if I already have a variable in the super global $ _SESSION?

0

I have the following code in the config.php file:

<?php
if(session_status() != PHP_SESSION_ACTIVE )
{
    session_start();
}

$_SESSION['id_sessao'] = session_id();

...

It happens that when I send the login form to insert another data in the session that in this case would be $_SESSION['login'] , this does not happen.

The login page looks like this:

<?php
require_once 'config.php';
...
$login = $_REQUEST['login'];
$_SESSION['login'] = $login;

...

Could you please help me out?

    
asked by anonymous 21.09.2018 / 19:27

0 answers