Question regarding Sessions

General discussions related to php

Moderators: gesf, Michalio

Post Reply
nugax

With php sessions, I am assuming you cannot add an associative array as a session variable?
Is that correct?
iago

$_SESSION is an associative array, but you can do s.th. like: $_SESSION['foo']['bar']
Strider64

nugax wrote: Fri Mar 19, 2021 1:38 pm With php sessions, I am assuming you cannot add an associative array as a session variable?
Is that correct?
You can, but that is also leading a person down a slippery slope as it tends to lead them to put everything in sessions. Sensitive data such a passwords should NOT go into sessions. Just my opinion.
Post Reply