Answer the question
In order to leave comments, you need to log in
How to get value from session?
Hello.
I exit the session, I get this:
Array ( [logged_user] => __PHP_Incomplete_Class Object ( [__PHP_Incomplete_Class_Name] => RedBeanPHP\OODBBean [properties:protected] => Array ( [id] => 1 [member_login] => 123 [password] => 123 [avatar] => [name] => ) [__info:protected] => Array ( [type] => users [sys.id] => id [sys.orig] => Array ( [id] => 1 [member_login] => 123 [password] => 123 [avatar] => [name] => ) [tainted] => [changed] => [changelist] => Array ( ) [model] => [data.bundle] => Array ( ) ) [beanHelper:protected] => __PHP_Incomplete_Class Object ( [__PHP_Incomplete_Class_Name] => RedBeanPHP\BeanHelper\SimpleFacadeBeanHelper ) [fetchType:protected] => [withSql:protected] => [withParams:protected] => Array ( ) [aliasName:protected] => [via:protected] => [noLoad:protected] => [all:protected] => ) [user] => Array ( [id] => ) )
$id = $_SESSION['logged_user']->id;
print_r($id);
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