Hi all,
My problem is that i start a session in a class and a can't register any variable in the session with $_SESSION['variable']=..;
//here is the class
class cart
{
function cart()
{
session_start();
if(empty($SESSION['register']))
{
if(empty($COOKIE['PHPSESSID'])): //for IE6.0
$Cookie_ID = session_id();
setcookie("PHPSESSID", $Cookie_ID );
endif;
$_SESSION['register']=1;
.......
i try i another class to register a variable but it doesn't work
//the class where i try to register
class user
{
..
//$row is a result from mysql
$_SESSION['id_user']=$row['id'];
...
i put the class cart in every page
i try with session_register, but the same result...
Thanks in advance.
Dani