Answer the question
In order to leave comments, you need to log in
How to get data from $_SESSION?
I load the page with AJAX, how can I get data from $_SESSION['data'] on the page being loaded?
Answer the question
In order to leave comments, you need to log in
На подключаемой станице нужно добавить код:
<?php
var_dump(isset($_SESSION['data']) && is_array($_SESSION['data']) && isset($_SESSION['data']['needKey'])) ? $_SESSION['data']['needKey'] : 'No data');
?>
<?php
var_dump(isset($_SESSION['data']) ? $_SESSION['data'] : 'No data');
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question