$session is not accessible to view |
(06-28-2020, 12:56 AM)@nuj_3313 Wrote: Thanks! it's work! It is necessary to pass any needed data to the view explicitly. The reason is that the "view" is in a different scope than the controller. However, keep in mind that the Session class is a wrapper around the Superglobal $_SESSION. You can access that easily from a view. For instance, assuming a person's name is saved in the session you should be able to do this in a view. PHP Code: <div><?= $_SESSION['name']; ?></div> |
Messages In This Thread |
$session is not accessible to view - by @nuj_3313 - 06-27-2020, 11:53 PM
RE: $session is not accessible to view - by jreklund - 06-28-2020, 12:04 AM
RE: $session is not accessible to view - by @nuj_3313 - 06-28-2020, 12:56 AM
RE: $session is not accessible to view - by dave friend - 06-28-2020, 06:42 AM
RE: $session is not accessible to view - by jreklund - 06-28-2020, 01:03 AM
RE: $session is not accessible to view - by InsiteFX - 06-29-2020, 03:05 AM
|