I've done stuff with sessions before and had no grief - just getting into OOPHP and having loads of greif...
here's the class
class dch_session
{
function dch_session() {
$this->dch_debug .= "Object dch_session running\n";
if(strlen($session_counter)<1) {
$this->sesh_id = microtime();
$this->dch_debug .= "Microtime done\n";
session_start();
$this->dch_debug .= "Session started\n";
if($session_counter<1) {
session_name();
$this->dch_debug .= "Session name set \n";
session_id();
$this->dch_debug .= "Session id set \n";
}else {
$this->dch_debug .= "Session continued\n";
}
$session_counter++;
session_register("session_counter");
$this->dch_debug .= "Session counter incremented to ".$session_counter."\n";
}
return;
}
}
.... and I call.......
$ses = new dch_session();
but if you go......
print($ses->dch_debug);
you'll see that the counter does not get incremented and it starts a new session every time through as a result so my guess is that it's not doing the session_register();
.... any ideas why?
thanks in advance 😉