Answer the question
In order to leave comments, you need to log in
Variables in SESSION are not updated. What to do?
Hello! At me after authorization session transfers variables on a trace. page, but when the database changes, the variables remain the same until I re-login to the account. Why are variables not updated?
This code works like this - I go into the account, displays the login. When I change in the database and reload, it does not display anything, var_dump shows NULL. And the variable takes on a new value only after logout and authorization.
<?php
session_start();
require_once 'connect.php';
?>
<?php
if (isset($_SESSION['signined']))
{
$user_login = R::getAll("SELECT login FROM users WHERE login = '".unserialize($_SESSION['signined'])->login."'");
$login = $user_login[0]['login'];
echo $login;
var_dump($login);
}
else
{
$_SESSION['message'] = 'Для доступа к этой странице необходимо авторизоваться';
header('Location: ../login.php');
}
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question