<?
include ('class.myclass.php');
$myvar = new MyClass;
$myvar->who = "me";
// this is where my doubt reside !!!
session_register ('myvar'); // like this ?
// don't need to register stuff in the class, it's already there.
// session_register ('who'); ?>
file2.php
// using an "&" you won't make a copy and you
// can work directly on the session var
$myvar = &$HTTP_SESSION_VARS['myvar'];
// should print "object"
echo "<br>" . gettype($myvar);
// use the object, "who" is not a session var
echo "Session Var : " .$myvar->who. "<BR>";
//echo "Session Var : " .$HTTP_SESSION_VARS['myvar']['who'] . "<BR>";
//echo "Session Var : " .$HTTP_SESSION_VARS['myvar->who'] . "<BR>";
?>
Starting to make sense?
Jack