I am working in a subfolder on my website: www.example.com/subfolder
Now, i want to set a session that is only accessible within www.example.com/subfolder
To achieve this, i did the following:
private $sessiontimeout= 10800;
private $subdomain = '/subfolder/';
private $website = 'example.com';
function __construct ($table)
{print_r( $_SESSION );
$this->table=$table;
$this->savedusername= $this->getsession('logbook');
session_set_cookie_params ( $this->sessiontimeout, $this->subdomain, $this->website, 0, 1 );
ini_set('session.use_only_cookies', 1);
if (!is_null ($this->savedusername))
{
$resultobj=selectquery ("select last_login_one from $this->table where username=?", "s", (array) $this->savedusername);
if ($resultobj['obj']->num_rows() > 0)
{
$this->last_login=$resultobj['data'][0]['last_login_one'];
}
}
}
Now when i print the $_SESSION array, it does not display anything, Not even 'Array()'.
Please what am i not doing right?
Thanks